LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default RowSource for User Form

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
How can Rowsource be used for a combobox on a form? Matt[_33_] Excel Programming 5 October 25th 05 03:00 AM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"