G
Greg Snidow
Greetings everyone. I am using Access 2003. I am trying to make a series of
cascading list boxes but I can not get it to work. Assuming I have listbox1
and listbox2 I am not sure about the code. This is what I have tried:
Private sub listbox1_afterupdate
me.listbox2.rowsource = "SELECT table.field2 " & _
"FROM table " & _
"WHERE table.field1 = '" & listbox1.value & "' " & _
"ORDER by table.field2;"
me.list2.requery
exit sub
I have tried to put this in both the after update and click event of
listbox1. At this point I am thinking maybe listboxes do not have "values",
but maybe some other way to distinguish what is highlighted maybe like an
option group? Basically I want my listbox2 to only display values
corresponding to the value chosen in listbox1. Any ideas? Thank you.
cascading list boxes but I can not get it to work. Assuming I have listbox1
and listbox2 I am not sure about the code. This is what I have tried:
Private sub listbox1_afterupdate
me.listbox2.rowsource = "SELECT table.field2 " & _
"FROM table " & _
"WHERE table.field1 = '" & listbox1.value & "' " & _
"ORDER by table.field2;"
me.list2.requery
exit sub
I have tried to put this in both the after update and click event of
listbox1. At this point I am thinking maybe listboxes do not have "values",
but maybe some other way to distinguish what is highlighted maybe like an
option group? Basically I want my listbox2 to only display values
corresponding to the value chosen in listbox1. Any ideas? Thank you.