I have this problem that I can't seem to find a solution to. I have a RecordsetDTC that is bound to a table that I am querying. The information for the query is pulled from a dropdown, call it Make, on the page via a request.form call. Another dropdown, Provider, is then populated when the first dropdown changes value. This is done in an onchange sub routine in VBScript. It works the first time the Drop1 is changed. The second dropdown is populated with the correct data and things are fine but when you change Drop1 a second time the data in the second dropdown stays the same.
Here is the code I am using, hopefully I am just missing something because I am new to all this.
Sub Provider_onchange()
SQL = Request.Form ("Provider"
Recordset2.setSQLText ("SELECT DISTINCT `Model Number`, `Servicer Provider` FROM `Tower Data` WHERE `Servicer Provider` = '" + SQL + "'" )
Recordset2.requery
make.setRowSource
make.setRowSource Recordset2 , "Model Number"
End Sub
Obviously that setSQLText statment is all on one line in my code but I can't fit it on one line in this form. Any ideas on what I am missing?
Thanks,
Steve
Here is the code I am using, hopefully I am just missing something because I am new to all this.
Sub Provider_onchange()
SQL = Request.Form ("Provider"
Recordset2.setSQLText ("SELECT DISTINCT `Model Number`, `Servicer Provider` FROM `Tower Data` WHERE `Servicer Provider` = '" + SQL + "'" )
Recordset2.requery
make.setRowSource
make.setRowSource Recordset2 , "Model Number"
End Sub
Obviously that setSQLText statment is all on one line in my code but I can't fit it on one line in this form. Any ideas on what I am missing?
Thanks,
Steve