troubleshooting Question

Access 2007 VBA code for Make Table Query

Avatar of pfmurray
pfmurrayFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Access
2 Comments1 Solution1108 ViewsLast Modified:
Hi Experts

I have an Access 2007 database which includes some  pass-through queries to a Great Plains database. The data in these queries is not updated very frequently however because of the way I'm using the db (Excel forms based interrogation of the Access db) the response times when these queries are invoked makes the Excel form user experience very slow. The GP databases are in USA and I'm in London.

So - what I want to do is to make a VBA routine in Access (which I can fire up from the Excel interface) which effectively makes a static table from the pass through. I have tested the db using this technique and the Excel forms run way faster. I don't need to make the static table from the actual pass-through query, I have a query on the query which allows me to Trim etc.

This is what I'd like to automate

1) Select the Query "CustomersTrimmed" (which is a query based on a pass through query called "Customers__GP")

2) Make a table from "CustomersTrimmed" called "Customers" - this table already exists and I'd prefer it to be recreated each time the VBA runs (unless the advice is to the contrary). The Excel forms will point to this table for Customer data rather than the pass-through query.

3) Suppress all warning messages so the user can can just click on the Excel form to update the table

I'm comfortable with Excel VBA but I've never touched Access VBA so I'm hoping someone can take me step by step through this.

I'm sorry if this is answered elsewhere but on searching today I haven't found anything I recognised.



Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros