View Full Version : Individual queries work but not in a macro


Lon425
09-08-2000, 06:46 PM
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

Lon425
09-10-2000, 06:05 PM
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

Richie
09-11-2000, 10:45 AM
Have you tried F9 after entering new data?

Lon425
09-11-2000, 12:50 PM
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