Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am venturing from an experienced Access/VBA developer to doing some work in
Excel with VBA. I need some help with how to accomplish a specific task. The objective is that the user needs to enter an employee name and have it return the Employee Number and Department. This data is in an Access database table. I want to use a combo box to make it easy for the user to locate the employee name and have it fill the cells in the row where the employee data is. In looking at how Excel combo boxes work, it says the combo rowsource has to be a worksheet range. I was hoping a could use a recordset like you do in Access. But since that does not seem to be available, I came up with this approach: Add a new worksheet. Create the recordset that contains the employee table from the Access database Use the CopyRecordsetFrom method to copy the row from the recordset into the new worksheet. Use the range the data is now in as my rowsource for the combo. When the user selects a row from the combo, load the other columns' data into the cells where the data needs to go. The question is, is this a reasonable approach or is there a better method to do this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
How can Rowsource be used for a combobox on a form? | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |