link combo box to Excel spreadsheet

  • Thread starter Slez via AccessMonster.com
  • Start date
S

Slez via AccessMonster.com

I have a control on a form from which I'd like to give users a drop down
combo box so they can select and populate the field's data. Ideally, the
drop down would contain records from an Excel spreadsheet. Is this possible?
If so, how do I accomplish this?

I tried the "Get External Data" feature, but the wizard won't allow that,
presumably because it's an Excel file.

Thanks for any suggestions!
Slez
 
K

Klatuu

You should be able to link to the spreadsheet as if it were a table. Then
the row source for the combo should be based on that table.

If you are having trouble with Get External Data, either you are not doing
it correctly or there is a problem with your installation. Are you getting
any errors or messages?
 
S

Slez via AccessMonster.com

I am trying the standard method by selecting Files / Get External Data /
Link Tables..., then I just follow the path to the file and when I click on
link I get the error: "The wizard is unable to access information in the
file 'G:\WPDOCS\Vanderwall\Customer Database.xls'. Please check that the
file exists and is in the correct format."

Should I be creating a table and somehow linking the spreadsheet to that?
Thanks
Slez
You should be able to link to the spreadsheet as if it were a table. Then
the row source for the combo should be based on that table.

If you are having trouble with Get External Data, either you are not doing
it correctly or there is a problem with your installation. Are you getting
any errors or messages?
I have a control on a form from which I'd like to give users a drop down
combo box so they can select and populate the field's data. Ideally, the
[quoted text clipped - 6 lines]
Thanks for any suggestions!
Slez
 
K

Klatuu

No, you don't need to create a table. It appears there is something wrong
with the spreadsheet file.
Open it and have a look at it. It needs to be in columns with column names
in the first row. There should be no empty rows between rows with data or
empty columns between columns with data. Also, what version of Excel and
Access are you using?

Slez via AccessMonster.com said:
I am trying the standard method by selecting Files / Get External Data /
Link Tables..., then I just follow the path to the file and when I click on
link I get the error: "The wizard is unable to access information in the
file 'G:\WPDOCS\Vanderwall\Customer Database.xls'. Please check that the
file exists and is in the correct format."

Should I be creating a table and somehow linking the spreadsheet to that?
Thanks
Slez
You should be able to link to the spreadsheet as if it were a table. Then
the row source for the combo should be based on that table.

If you are having trouble with Get External Data, either you are not doing
it correctly or there is a problem with your installation. Are you getting
any errors or messages?
I have a control on a form from which I'd like to give users a drop down
combo box so they can select and populate the field's data. Ideally, the
[quoted text clipped - 6 lines]
Thanks for any suggestions!
Slez
 
S

Slez via AccessMonster.com

The only thing I can see that might be an issue is the first column does not
have a column name. All other columns have the name in the first row. There
are no other data gaps. I'm using Access 2002, and our Excel is part of
Microsoft Office XP.

Based on that, it doesn't seem to me that there should be any problem with
the link...but obviously there is... It doesn't help that this is my first
time trying to link to Excel either!

Any further ideas or suggestions are appreciated!
Slez
 
K

Klatuu

Try putting a column name in the first column. Are the column names all in
Row A?

Can you describe what happens when you attempt to link to the file?
 
S

Slez via AccessMonster.com

All column names are in Row 1. I made sure each one now has a name.

What happens is exactly what I described in my second post for this topic. I
follow the path, and click the LINK button, and I get the error message.
Try putting a column name in the first column. Are the column names all in
Row A?

Can you describe what happens when you attempt to link to the file?
The only thing I can see that might be an issue is the first column does not
have a column name. All other columns have the name in the first row. There
[quoted text clipped - 7 lines]
Any further ideas or suggestions are appreciated!
Slez
 
K

Klatuu

Then there is something wrong with that particular spreadsheet. Have you
tried linking to any other spreadsheets to see if they work?

Slez via AccessMonster.com said:
All column names are in Row 1. I made sure each one now has a name.

What happens is exactly what I described in my second post for this topic. I
follow the path, and click the LINK button, and I get the error message.
Try putting a column name in the first column. Are the column names all in
Row A?

Can you describe what happens when you attempt to link to the file?
The only thing I can see that might be an issue is the first column does not
have a column name. All other columns have the name in the first row. There
[quoted text clipped - 7 lines]
Any further ideas or suggestions are appreciated!
Slez
 
S

Slez via AccessMonster.com

I'll do some experimenting in the coming days with some mock data in a brand
new spreadsheet. Hopefully that will shed some light on the problem.
Thank you very much for all your attention and help!
Slez

Then there is something wrong with that particular spreadsheet. Have you
tried linking to any other spreadsheets to see if they work?
All column names are in Row 1. I made sure each one now has a name.
[quoted text clipped - 11 lines]
 
D

davjoh123

Have you highlighted the block of cells you want to link to that make
up the table?

I'll do some experimenting in the coming days with some mock data in a brand
new spreadsheet. Hopefully that will shed some light on the problem.
Thank you very much for all your attention and help!
Slez

Then there is something wrong with that particular spreadsheet. Have you
tried linking to any other spreadsheets to see if they work?
All column names are in Row 1. I made sure each one now has a name.
[quoted text clipped - 11 lines]
Any further ideas or suggestions are appreciated!
Slez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top