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!

combobox question

Status
Not open for further replies.

jommyjet

Technical User
May 19, 2003
49
US
I have a combobox looking up names(last name, first name)in a table, but I'm unable to select from the list. Are there specs for the underlying table or query that limit the data that can pass through? the table has two fields, name and id, and the name field is expected as smith, bruce. thanks for the help in advance
 
In design view of the form highlight your cbo and show its properties
Row source there should be three dots(eclipse)click on these and you should have a query set up that will let you choose your table and fields select what you require and there should required list varing on what you want displaying

Hope this helps
Hymn
 
Did you create the combobox with the wizard? Trash this one and use the wizard. Make sure on the Toolbox toolbar the button with the Wand and Stars is pushed in. Then create your combobox. In the wizard, you'll select the fields you want to see (lastname, firstname) and they're selectable.

Neil
 
Thanks. I've done both and I still can't select the data. When I change the table look-up, all is fine. I wonder if there's anything terrible about using a comma?
 
What? Do you have two SEPARATE fields, one name Lastname and other Firstname? Or do you have ONE field with LastName, FirstName? Rereading the original question, I think I made a mistake. You have ONE field. But that's alright. Again, just use the wizard. Now in your form, are you saying that the combobox doesn't open? Or are you saying that when you select a name, that person's information doesn't appear in the other textboxes? You're very unclear.
If you want information about the name you selected, put the following on the OnClick event of the combobox.

Dim R As DAO.Recordset
Set R = Forms![FormName].RecordsetClone
R.FindFirst "Name_ID = '" & Me![ComboBoxName] & _
"'"
Forms![FormName].Bookmark = R.Bookmark
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top