"Delete Record and Close" Button

Uvuriel03

Registered User.
Local time
Today, 12:11
Joined
Mar 19, 2008
Messages
115
I'm trying to create a button that will delete the current record and close the form using Macros. (I'm terrible at VBA--if anybody knows a good tutorial site, please, link away!!)

If I could get some help with what actions to use for the macros, I would really appreciate it!!

Thank you!
 
Hello Uvuriel,

First, create a new macro. Under the action column on the 1st line, type 'RunCommand'. Look down where you'll find a command line. Enter DeleteRecord. Then on the 2nd line, type 'RunCommand'. Enter Close on the command line. Save your Macro whatever name you chose (DeleteClose).

Open your form in design view and create a button. Open up the properties and on the 'OnClick' event, enter the Macro name, and you're done.

Note you will get a delete record confirmation. If you want to avoid this, insert a row in your macro above the first line and enter 'SetWarnings'. Look below and make sure 'Warnings On' is set to No.

Hope this helps...
 

Users who are viewing this thread

Back
Top Bottom