Append and Delete Query Question

Mojo1

Board Regular
Joined
Mar 6, 2003
Messages
148
I have an append and delete query that I want to run off the onclick of one command button. Currently it is only appending data and not deleting.

I have this in the criteria for the append and delete query's

[Forms]![Form Name]![From Field]

Here is what I have for the code of the command button as well:

Private Sub cmdArchive1_Click()



DoCmd.OpenQuery "AddRecord"
DoCmd.OpenQuery "ArchiveRecord"


End Sub


Can any one offer any help??
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Can you tell if the delete query is running at all?

If you post the sql from the delete query, this might help us help you.

-gator
 
Upvote 0
Is your delete query in your code? Neither "AddRecord" nor "Archive Record" sound like delete queries.
 
Upvote 0

Forum statistics

Threads
1,221,519
Messages
6,160,295
Members
451,636
Latest member
ddweller151

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top