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

combo box on unbound form to search for records

Status
Not open for further replies.

tman72

Technical User
Jan 22, 2003
116
US
Is it possible to creat a combo box on an unbound form to search for a specific record? I am using Access 2000 and DAO 3.6

Thanks.

 
I am not sure what you are trying to do, but if you insert a combo box you can have it look up any records you like from a table. It doesn't matter if the form has a record source or not.

Aaron
 
You could also use a parameter query. Set the criteria in the query field to the bound column of the combo box. Then use a dlookup on the query to fill your textbox fields. This might not be the fastest way but it works.
jim
 
tman72

Combo boxes are a great way for
to search for a specific record

In fact the combo box wizard offers this as one of it's options. When you invoke the wizard, select the option "Find a record on my form..."

You also have the ability to use a combo box to apply a filter...
[tt]
Me.Filter = "YourField = " & Me.YourComboBox
Me.FilterOn = True
[/tt]
Or variation there of.

Note: You need to use quotes for string / text values.
[tt]
Me.Filter = "YourField = " & """ & Me.YourComboBox & """
Me.FilterOn = True
[/tt]

Or you can create your onw SQL statment based on the combo box and use is as a record source.

Richard
 
Thank you to all of you. The option "find a record on my form.." was not working properly due to corruption. I ended up creating a new db, importing all my forms, tables, etc. and things are working fine. Sorry for taking up your time when my real problem was corruption.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top