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

Populate combo box w/info stored in an Access Table?

Status
Not open for further replies.

Wabba

Programmer
Jul 29, 2002
1
US
I have created a series of input boxes for my users to enter information. It asks the user if they would like to preview or print a report, then it asks if they would like a summary or a full report and then the last input box requires an employee name, which could be misspelled by users. I would like to however, create a combo box or drop down box that does not require the user to type in this information (employee name). Does anyone know how to do this in VBA?

The employee names are in a table in the current database, which I would like to link to the VBA combo box.
 
hi Wabba
just go in the forms design view,
create you combobox or dropdown list
and select the control source as the table or
you could click the build button [...] next to the
control source box and create a small query that isolates the required column. then just save it and the SQL statement for that query will be placed in the control source box.

if you absolutely must do it in code then you can
use "me.yourComboBoxName.ControlSource = (a query name or sql statement)

hope this helps,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top