Help with macros to add record and cancel data entry

  • Thread starter Thread starter paule_marshall
  • Start date Start date
P

paule_marshall

Hi all,

I am buidling my own simple task mangement system I have a form
(add_tasks) for entering data to a table (tasks) and want to create two
macros - please can somebody tell me what actions to use for the
following:

1. Add task
When the submit button is clicked on the add_tasks form I want a macro
to run which adds the entered data to the tasks table, closes the
add_tasks form and opens another form.

2. Cancel
When the cancel button is clicked on the add_tasks form I want a macro
to run which clears any data currently in the form, closes the
add_tasks form and opens another form. This macro needs to tell Access
to ignore several 'required' fields.

Hope somebody can help.

Many thanks in advance.

Paul
 
Paul,

1. There should be no need to explicitly add the data to the tasks
table, this will happen automatically when the form is closed. So, the
actions you need are:
Close
OpenForm

2. Assuming you mean Cancel to abort a partly entered new record (as
against delete an existing one):
Undo
Close
OpenForm
There should be no need to explicitly ignore required field, the Undo
action should revert to as if no record had been started.
 
Back
Top