VBA coding to retrieve data from Access to Excel :S

  • Thread starter Thread starter Vicks
  • Start date Start date
V

Vicks

Hey everyone,

This is what i have so far. I have an excel workbook with 3
worksheets, SETUP, DATA and DISPLAY. I have been using a pre-coded
program to bring data from a database where the program using the SETUP
sheet from the excel workbook as its critaria and then populates the
DATA sheet. I then can use the DATA sheet to display data in the
DISPLAY sheet in which ever way i want.

Complication is that this pre-coded program is limited to the amount of
tables it can hit at a time. Basically its programmed to read up to 3
tables.

I now need data from 5 tables all together. The first three can come
from the pre-coded program. Now i need to use VBA to first go read the
data i want from the tables and then create fields/rows in the DATA
sheet . . obviously AFTER its done writing its columns/rows from the
pre-coded program (first 3 tables).

Im only having this problem because i cant see the code for this
'pre-coded' program . . otherwise i would have just seen how it was
done from there!!

ANY help would be appreciated . . .

Thanks in advance
~Vicks
 
It's very possible that your needs require a more elegant solution than
this, but have you tried using the Import External Data command to
launch MS Query. I know that when I've used this in the past, I've had
good luck. If formatting is an issue, you can of course create a query
in Access and then import the results through this method.

Hope this helps, but probably not.

Michael Cumming
 
Hey Michael,

Thanks for the suggestion . . . I guess the requirement is that I
hardcode it in VBA as this excel template will be run from another
application . . . as an ADD IN . . so yea . . . im gonna keep chugging
along with the VBA :S

Thanks again,

Vicks
 

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

Back
Top