I think it doesnt work in Access Project.... Sent from Yahoo! Mail on Android |
From: Toby Bierly <toby@stahlbush.com>;
To: AccessDevelopers@yahoogroups.com <AccessDevelopers@yahoogroups.com>;
Subject: RE: [AccessDevelopers] Dynamic Combo Box
Sent: Wed, Feb 15, 2012 6:34:41 PM
Exactly what Duane said, but here's a little more detail. Go to the Properties for the combo box, Data tab. The Row Source for the combo box (hit the ... button and it will take you to the query design window) needs to have the text box in the criteria. To refer to the text box, use something like this: Forms!FormName!TextBoxName You'll end up with the rowsource for the combobox looking something like this once back in the properties window: SELECT DataFieldName FROM TableName WHERE FilterFieldName=Forms!FormName!TextBoxName; Then, to Requery the combo box, put something like this in the AfterUpdate Event of the text box: Private Sub TextBoxName_AfterUpdate() ComboBoxName.Requery End Sub Then, each time you change/update the text box, the combo box will re-run the rowsource query which filters based on the text box value. Hope that helps, Toby
|
__._,_.___
Please zip all files prior to uploading to Files section.
.
__,_._,___
Tidak ada komentar:
Posting Komentar