How to create a command that will save and close a form automatically

  • Thread starter Thread starter Sib
  • Start date Start date
S

Sib

I am trying to get a command button on the form to
automatically save and then close the form once I have
entered the data and then tab to that command button (on
the exit portion of the tab). I can get it created but
can't seem to figure out how to get it to close the form
after I tab off of the command. Basically I want to be
able to enter the data in the form and then once done be
able to have the form close with the next tab button,
without going to another blank version of the form.
 
Sib said:
I am trying to get a command button on the form to
automatically save and then close the form once I have
entered the data and then tab to that command button (on
the exit portion of the tab). I can get it created but
can't seem to figure out how to get it to close the form
after I tab off of the command. Basically I want to be
able to enter the data in the form and then once done be
able to have the form close with the next tab button,
without going to another blank version of the form.


DoCmd.CLOSE
 
Tried the command DoCmd.Close but does not work with the
form. Says invalid code for use within form. :(
 
Back
Top