S
sara
I want to populate a list box based on a selected parameter from another list
box.
I have been trying to do something like this in my OnClick routine of my
source listbox;
Public Sub List1_Click()
Dim ID As Integer
myID = List1.Column(0) // This correctly gives me the selected value
/*Now i want to use the below SQL statement to help me somehow populate the
destination list box*/
select field1,field2,field3,field4
from mytable
where AppID=myID
End Sub
An alternate way (which also has failed) could be to set the row source of
the destination list box. What i tried to do was to write the above select
statement as it is:
select field1,field2,field3,field4
from mytable
where AppID=List1.Column(0)
And i get an error in the last line(((
Can someone help me out with this
box.
I have been trying to do something like this in my OnClick routine of my
source listbox;
Public Sub List1_Click()
Dim ID As Integer
myID = List1.Column(0) // This correctly gives me the selected value
/*Now i want to use the below SQL statement to help me somehow populate the
destination list box*/
select field1,field2,field3,field4
from mytable
where AppID=myID
End Sub
An alternate way (which also has failed) could be to set the row source of
the destination list box. What i tried to do was to write the above select
statement as it is:
select field1,field2,field3,field4
from mytable
where AppID=List1.Column(0)
And i get an error in the last line(((
Can someone help me out with this