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

Search combo box.

Status
Not open for further replies.

Dreamboat

Instructor
Nov 7, 1999
4,881
US
Hi, you wonderful experts, you!

I'm no Access expert, but I do okay if you can tell me exactly what to do. Someone told me how to do this on Thursday at work, and now I have forgotten all the details.

So, I put a combo box in my form header.
I know it needs to be unbound.
I know I need to change all the fields on the form to be something like cboMyComboBoxName.Columns(3) or whatever. But I don't remember.

I know I need to change something under the data for the combo box properties. I want to do this from a query called qryUsers, and I only have 6 fields I want to return, including the UserID field. I do forget if my first column is (0) here or (1).

I appreciate your help so much!! dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
Geeze. Where are these guys coming from? I used the wizard. Now, however, I need my search combo box to have focus when the form is opened. I can't use the tab order--it doesn't help.

:) dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
The very first form in MS Northwind Database... The Orders form does exactly what you want. Open the form in design mode and examine the code behind the combobox at the top of the form. I have no idea what I'm talking about
 
Thanks, dumdum. I don't see how any of those forms will help, but I appreciate the reminder. I always forget about that database! dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
Ok, I'll keep trying but... As in the Northwind Orders form, The first combobox could be changed to have its recordsource as your query. Then in the afterupdate event of the combobox (you'll see this in the code) just change the names from those default ones the the names that are on your form. Then it would update those textboxes with the query results.

Or am I missing something here? I have no idea what I'm talking about
 
I've got the search to work. Problems now are:

1) I create a combo box search on another form, and all I get is runtime error 3021 (but my Access guru-type buddy currently has the DB).

2) I don't know how to set focus to the combo box on opening the form, at least not without an on-open event or something, and I was sure it was just a setting, but not in the tab order.

Thanks for your help! dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top