View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.access
travis[_3_] travis[_3_] is offline
external usenet poster
 
Posts: 58
Default Beginner question about importing data from Access into Excel

For my work I have to write a lot of Word documents which are linked to
Excel spreadsheets for calculations and tables. I've got it all
figured out between Word and Excel, everything works. I have a series
of Word template documents extensively linked to a single Excel
worksheet which is where I do most of my work, the document really just
requiring formatting and a little bit of typing once my work in Excel
is done.

The next step for me, which would be enormously beneficial in terms of
time savings, would be to be able to link the Excel documents to an
Access database. This would save me a lot of typing things into Excel,
especially when I go back to repeat a job done earlier where much of
the data has already been entered once.

(Why can't I just re-use the old spreadsheet which presumably I have
archived from the first time I entered the data? Its because I keep
making improvements to both the spreadsheet and the Word documents and
the spreadsheet I used for a job a few months ago, which has much of
the information I require, is no longer compatible. Having a database
which retains the data and can be maintained as compatible with the
spreadsheet would eliminate this problem.)

I want to be able to pull basic information from the database, like
names and dates of birth etc, to go into specific cells in the
spreadsheet which then get manipulated and eventually find their way
into the Word document.

It seems to be easy enough using the Import external data function in
Excel to connect to the database and pull a particular piece of
information, but I want to switch between clients easily and quickly
without having to rewrite the SQL statements.

i.e. I know how to structure a query so I can pull a piece of data, a
date of birth for example, from the database, and I filter on "date of
birth" where CustomerID equals value SMITHJ, for example. I can then
go through setting up these queries for every piece of information I
want to pull from the database.

The problem with that is that if I want to switch over to customerID
JONESC and pull all of their data out, I've got to change all the
queries to JONESC by editing them all in MS Query. That's not very
efficient, I might as well retype the data.

I'd rather be able to put a desired customerID into a particular cell
in the spreadsheet and for the queries all to use that customerID
rather than a hard coded one. So after I'm done with SMITHJ I just
type JONESC into the clientID cell and Excel then imports all of Mr
Jones' data from the database. Better yet, I'd like to have a drop box
which I can use to select a client ID from a list, and once selected
the queries would all being in the selected client's data.

So how do I set this up?

Thanks in advance.

Travis