Append and Delete without 2nd prompt (1 Viewer)

Adrianna

Registered User.
Local time
Today, 05:53
Joined
Oct 16, 2000
Messages
254
Okay...I know there have been alot of discussions about this, but this is not exactly the same.

I have an option on my main switchboard allows the users to Archive certain records by running an append query. The users are prompted for the two fields that make up the Primary key...then the query runs based upon those findings.

That's great. Now I want to run a delete query to remove the record that was just appended. Problem is that I want to make it invisible to the user. So...I don't want to have to prompt them again. Prompting them to make the entry again lesves room for errors and I can't risk appending one record, but deleting a different one.

How can I call upon or reuse the information that was originally prompted for. I can picute it in Java, but I have no idea how to do it here.

Any Ideas?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:53
Joined
Feb 19, 2002
Messages
43,302
Use unbound fields on a form to hold the key fields. Then both queries can reference the form fields. No prompting will happen with this method.
 

striker

Useless and getting worse
Local time
Today, 10:53
Joined
Apr 4, 2002
Messages
65
suppressing warnings

If the delete procedure uses a VB script you could just before the actual delete statement use the following.

DoCmd.SetWarnings False

then after the delete statement switch the warnings back on by using

DoCmd.SetWarnings True.
 

Users who are viewing this thread

Top Bottom