asked on

Populating Cells in excel using a combo box in excel from an access table or query.

What I'm trying to accomplish is getting data from a table in Access to Excel only populating certain cells within an Excel Sheet by selecting the Supplier Name from a drop down box that user selects.  The Combo Box selection is in the Excel file.

 I have a database called Supplier

 For example: Table Called Supplier.  When the user selects a Supplier name it populates the following:

 Supplier_Name to cell B3
 Supplier_Address to cell B4
 Supplier_City to cell B5
 Supplier_ST to cell C5
 Supplier_Zip to cell B6
 Supplier_POC to cell B9
 Supplier_Phone to cell B12
 Supplier_Fax to cell B15

 The Excel file is called RFQ:  

 See attached files

Microsoft OfficeMicrosoft AccessMicrosoft Excel

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon

Since the sheet you want to populate is not a "table", then you have to use OLE automation.  That means you need to write VBA code to open Excel and update each cell one at a time.  You can't use TransferSpreadsheet.
Subodh Tiwari (Neeraj)

Please find the attached with a drop down in cell B3 on Sheet1.
The code assumes that the database C--Users-Luis.Freund.EXT-Desktop-E.accdb is saved at your desktop.
So once you select a name from the drop down in B3, the code will retrieve the relevant data on the AccessData sheet and the formulas on Sheet1 will return all the data from AccessData sheet.
The third sheet is called List contains a list of suppliers which is used as a source for validation list in B3 on Sheet1.

See if this is what you were trying to achieve.

Note: This is a macro-enabled workbook so you will need to enable the macros while prompted.


I added more records to the DB and added the supplier name to sheet3 but on the dropdown box I'm not seeing the new suppliers I added.

any ideas?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Subodh Tiwari (Neeraj)

Okay. Please find the attached and just add suppliers names on List sheet starting from A2 and all the names would be visible in the drop down list in B3 on Sheet1.

THIS IS GREAT!   Another quick question....how did you create the combo box and link it to the list?
Subodh Tiwari (Neeraj)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question