I've got 2 DTC listboxes in a Parent/child relationship format. Everything works good except when you hit Back on the browser the "parent" listbox doesn't refresh, yet the "child" listbox refreshes. I had this problem for a while now and can't seem to figure it out. Here's the code I have in the on change event for the listboxes:
'Parent listbox
Sub Listbox1_onchange()
Recordset2.close
Listbox2.clear()
num = listbox1.gettext()
query1 = "SELECT system from main where site = '" & num &"' ORDER BY system"
Recordset2.setSQLText query1
Recordset2.open()
Listbox2_onchange()
end sub
-------------------------------
'Child listbox
Sub Listbox2_onchange()
Recordset3.close
num1 = listbox1.gettext()
num2 = listbox2.getText()
query3 = "SELECT * from main where site = '" & num1 &"' and system = '" & num2 &"'"
Recordset3.setSQLText query3
Recordset3.open()
end sub
---------------
If any of you can give me any suggestions I'd appreciate it. Thanks U.
'Parent listbox
Sub Listbox1_onchange()
Recordset2.close
Listbox2.clear()
num = listbox1.gettext()
query1 = "SELECT system from main where site = '" & num &"' ORDER BY system"
Recordset2.setSQLText query1
Recordset2.open()
Listbox2_onchange()
end sub
-------------------------------
'Child listbox
Sub Listbox2_onchange()
Recordset3.close
num1 = listbox1.gettext()
num2 = listbox2.getText()
query3 = "SELECT * from main where site = '" & num1 &"' and system = '" & num2 &"'"
Recordset3.setSQLText query3
Recordset3.open()
end sub
---------------
If any of you can give me any suggestions I'd appreciate it. Thanks U.