Individual queries work but not in a macro

Lon425

Registered User.
Local time
Today, 21:09
Joined
Aug 31, 2000
Messages
10
I am using 7 queries to build an packing slip and invoice data table including incrimenting the Invoice Number. When I run the queries one after the other manually they all work fine and the record gets built. When I put them into a Macro the first time it works fine. The second time I get a Key violation. Never a Key Violation Manually no matter how many times I run the sequence of queries. Very Strange. Please help if you can. Thanks
 
OK I found out that if I leave the form from which I am processing the records, I do not get the Key errors. So I set the macro to run on the On Unload Event and it works. Can anyone tell me why and what I can do to be able to stay on that form and process successive updates. This is also true if I add a customer from the orders form Via a button to customers. I then can't see the added customer in a lookup until I leave and come back to the orders form. Same deal I think.
Any help would be appreciated.
Thanks
Lon
 
Have you tried F9 after entering new data?
 
Richie,
That seems to have helped but it turns out that by forcing the user to leave the orders screen after they enter the appropiate data, I can control the flow better.
Thanks very much for your help
Lon
 

Users who are viewing this thread

Back
Top Bottom