Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append query in multi-user environment. HELP!!! PLEASE!!!

Status
Not open for further replies.
Jan 22, 2001
124
US
I just read in the Access '97 Developers Handbook that for append queries, the target table is locked. Well because of this, if two or more users are attempting to append records to this table, an error message occurs, and more importantly, the record does not get appended. This causes a HUGE problem because I have a delete query that runs right after the append query which deletes the record that was attempted to be appended. Because of this, the record is lost. Any suggestions would be GREATLY appreciated. Thanks.

--Rob
 
Run the delete query after the append query.

Sidenote: Running appends here and there in a multi-user environment is a BAD idea. You should find a way to either get exclusive access to the table for your appends to execute or find another method to accomplish what you want.

Joe Miller
joe.miller@flotech.net
 
I DO have the delete query after the append query. That's where the problem lies. If the append query does not work, the record is still deleted.
 
Then before you execute the delete command, use a DCount to check and see if the record you wanted to add got added. If it didn't then don't fire the delete command and pop up a msgbox telling the user to try again. Joe Miller
joe.miller@flotech.net
 
Joe

I think your last suggestion would work, but I think I'll follow your second suggestion in your first posting. Maybe one person will have to click a certain button to run those queries and update the dbase. That way we can be assured that only one person is appending records to that table at that particular time. Sound good to you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top