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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntex code

Status
Not open for further replies.

HandJT

Technical User
Jun 23, 2004
84
US
Can anybody give me a syntex for adding records to a combo box after a user performs a search? (Access would then place the matching records in a combo box for the user to choose which record he or she would like to view.) Then be able to click on a record in the list to view its contents?
 
The search form is where the user would perform the search. Access would perform the search within two of my tables. The "Results" form displays the results. In the Results form is where the combo box is. I want it to list the records that have, lets say the DWG#, on it and list them. Then I or the user could click on a record and have Access display the contents. I have it working so far exept for listing the other records. It will only display one. The line I am having trouble with is this one:

Form_SearchResults.NDW.value = rs3![NDW]

The .value is the problem. I've tried AddItem, Itemdata, and those will not work either. If you could help that would be great. Thanks a million!!
 
Have a look at the RowSource property of the ComboBox object, it can be a sql select instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I have the RowSource Type as value list. I also took the .value off of the statement above, however it still will not list them in the box. I think that there may be another statement that would follow the one above instructing Access to list them in the box, however I am at a complete lost as to do that or what to use. So, if you have any suggestions that would be awesome. Thanks.
 
If RowSourceType is list then RowSource must be a semicolon separated list.
Why not considering RowSourceType as Table/Query and build on the fly the SQL code for RowSource ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top