DBList problem. Help! 
Author Message
 DBList problem. Help!

What I am trying to do should be fairly simple, but I just can't figure
it out.  As you can probably tell, I am new using VB.

 I have two DBList objects in an ActiveX document.  Basically, the first
list just displays a column from an Access table.  The items listed are
used as a foreign key in the database for a the second table.  In the
second list, I just want to display the items that correspond to the
selected item in the first list.  I know I can write a simple SQL query
to get my second list, but then I don't know how to display the results
of my query  in the DBList object.  I also tried to do this setting up
the properties of both DBList objects, but that just confused me even
more.

This is what I came up with:

Data1 = source header list
Data2 = source detail list

Private Sub DBList1_Click()        'DBList control box
    Dim SQLquery  As String

    SQLquery = "SELECT Description FROM Table2 WHERE ProjectName = " &
DBList1
    Data2.RecordSource = SQLquery
    Data2.Refresh

 End Sub

    Sometimes the error I get is that there are too few parameters for
the Data2.Refresh line, and sometimes I get a message that says that it
is an invalid SQL statement (??).

Any ideas?  Help!

    Alex Freitas
    St. Louis, MO



Sun, 18 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DBList problem. Help!

2. HELP!!! DBList Problem

3. PROBLEM HELP - Data control on one form and dblist on the other

4. DBList Control Problem, please help me I'm an idiot

5. PROBLEM HELP - Data control on one form and dblist on the other

6. rowSource + dataSource with DBList problem (VB5)--please help

7. How to populate one dblist based on another dbList value

8. dblist problem

9. ? Database - dblist problem

10. Problem with DBList Control

11. DBCombo and DBList problem in VB4

12. DBList.visiblecount problem

 

 
Powered by phpBB® Forum Software