When I try to run this code I get an error message box that says:
Compile error:
Expected: end of statement
What am I missing?
When I try to run this code I get an error message box that says:
Compile error:
Expected: end of statement
What am I missing?
Sometimes when I cut and paste, the forum eats my carriage returns.
In my code, there is a line like this
put a return after the () like thisCode:Public Sub CreateSSWPDUnion()On Error GoTo Err_CreateSSWPDUnion
Code:Public Sub CreateSSWPDUnion() On Error GoTo Err_CreateSSWPDUnion
Oh man, what a difference a simple CR makes. The code works exactly as I had hoped. You're incredible, thank you.
In an earlier post there was mention of a 15 minute run time. Is the code module to run this code very complicated?
You would only need to run this code to regenerate the query SQL whenever a new table is created. If you wanted to, you could set up ways to run the regen automatically, either the first time anyone logs on in a day, or on command, or every hour, or whatever. For example, using the timer on a hidden form for one - and ONLY ONE - user.
Please mark this thread solved (top of page, under Thread tools), then start a new thread asking about how to run a query on a schedule... there are lots of ways so that's likely to be a long discussion.
Thanks again for helping me with this issue.
This problem is SOLVED
You're quite welcome.