![]() |
|
|
#1
|
|||
|
|||
|
I have a Word document that is filled with data. I set up a button on the document where the user is supposed to click on the button and run VBA code. The code is supposed to open an access database and run a select query and then insert new data into the access database. The database is in the same directory as the document. I am limited to starting it from Word with the button. The button works and runs the VBA. I just don't know what to use to get the database open and queried. Help would be greatly appreciated. thanks.
|
|
#2
|
|||
|
|||
|
The solution is not trivial unfortunately.
What I would do is add a reference to the Microsoft Access Object Library within your VBA code in Word, and then open an instance of Microsoft Access, then use commands such as OpenDatabase(), etc. to do your stuff. From there, you would populate tables, run queries, etc. Hope this gives you some direction. |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Access 2003 could not update; currenty locked. | WHEELS | Queries | 0 | 11-10-2008 09:35 AM |
| Microsoft Access 2003-Missing Records?? | kristenlee | Access | 1 | 04-04-2008 04:43 PM |
| access 2003 automation issue | BevA | Programming | 2 | 05-01-2006 06:37 AM |
| Report preview zoom problem with Access 2003 | neil | Reports | 1 | 04-05-2006 11:58 AM |
| Help! Newbie needs help with Access 2003!!! | infernojericho | Access | 0 | 12-03-2005 05:11 PM |