Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lucas Ward   on Mar 25 In MS Office Category.

  
Question Answered By: Sultana Tabassum    on Mar 25

Yes, it's possible, but not quite as easy as you think. There will be a lot
of coding. I've never done this in Excel, because I rarely need to use
Excel. But I've created many Word docs that have form fields or bookmarks
that I associate with an access  database. It actually works out great
because, as you already know, people are more apt to using the program they
already know.

To connect to an Access DB, you need only create  one and use ADO, ActiveX
Data Object to make a call to the DB, open  it and run code queries that
create a temporary RecordSet...from which you access your data. You can see
many samples/info of my projects doing this with Word here:
http://www.mousetrax.com/Consulting_Solutions.html

You'll just need to adapt the coding and design to Excel versus my samples
that I adapted to Word.

I do have a sample Word database  connectivity article out there with a free
code sample. So if you know ANYTHING about Word, you can download the sample
and get the idea and code to see how it works.

Then, rather than putting info in form fields, as I did in Word, you'll
connect the referenced data  to the cell name in your sheet. In other words,
when I say in Word to make the form field called "myBookmark1" equal to the
data in whatever field in Access...you would do a similar thing, except
you'd make it equal to day "B21."

You can find  my sample for Word w/code download to connect to an Access DB,
here: http://www.mousetrax.com/techpage.html#autoform Scroll down to the
PLEASE FILL OUT THIS FORM series and open article # 5 for Database
Connectivity.

Then you can go here to get the connection string to use for Excel:
http://www.connectionstrings.com/

Share: 

 
 
Didn't find what you were looking for? Find more on Work order tracking Or get search suggestion and latest updates.


Tagged: