Problem with make table query and merge to Word template

TryingMyBest

Registered User.
Local time
Today, 23:29
Joined
Nov 18, 2004
Messages
54
Hi guys!

I have my word template set up such that some data is copied from the open form into the document and some data is taken from a table which is created from a query based on the content of the form (the record number). This works well HOWEVER (there's always a however isn't there :rolleyes: ) where two users click on the button at exactly the same time or within a very short space of time the query only runs once and either the database crashes (bad) or the document is created for the second person with the wrong data (very bad).

How can I make it so that only one person can run the query at a time (ideally build in a delay in processing so that the query will run for them when the first person has finished...failing that a message to say please try again later)? They will always be working with a different record.

I'm a bit stuck as to what to search for in the forum for an answer to this so haven't really searched.....sorry :(

Many thanks
Jo
 
Does it only happen if the two users try within a very short space of time or does it do the same whenever one user has created the table, but not finished using it?
I run some mailmerge letters from a temp table created with make table query, but when the user attempts to create the table, I test to see if the table exists. If it does, the second user is told to try again later. If it doesn't, the query runs and they can produce their letters. Once they have finished with the letters I delete the temporary table so the next user can run their letters. Be wary about creating temp tables a lot though, as even when you delete the table, the database size won't decrease again until you compact the database. If you can, it'd be better to work straight from a query I think.
 
It happens when both try to run the query within a short space of time. Your solution sounds like it might work well in my situation (database compacts when closed and only 10 users so this is frequent) I'll give it a go...thanks!

Jo
 

Users who are viewing this thread

Back
Top Bottom