Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to update DTC cboBox

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello. I have two DTC combo boxes. On the Afterupdate Event of one, I need the other combo box to show the new recordset. The code below works great when I am filtering from one DTC combo box to a DTC text box. I don't undertand why it doesn't work going from one combo to another?

Sub cboCombo_onchange()
If rsSelect.isOpen() then rsSelect.close
sql = "select * from rsSelectWhere NALC= '" & cboCombo.getValue() & "'"
rsSelect.setSQLText(sql)
rsSelect.open

Any help would really be appreciated.

Thanks,
Rene
 
I can't believe how easy that was. It works great! Thank you so much for your help.

Rene


 
me again. After making a selection from combo box 1, combo box 2 is filtering beautifully; however, now when making a selection from combo box 2, the corresponding fields are not getting updated. I'm using the same code I use when ever I perform an onChange() event of a combo box, so I don't get what's wrong???


Sub 2ndcboBox_onchange()
If tblCurrentStat.isOpen() then tblCurrentStat.close
sql = "select * from tblCurrentStat Where ID= " & cboDate.getValue()
tblCurrentStat.setSQLText(sql)
tblCurrentStat.open

Thanks again for your help.

Rene
 
Try turning on the trace feature
@set @trace = true
at the top of your asp page.
This will show you what is going on when the page loads. You may find that the grid is initialising before the combo gets a chance to change the SQL. You may need to change the posistion of the combo(s) or force the grid to re-initialise in the combo selected code.

Sorry that I cannot be more specific at the moment. Good luck! (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top