Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Record & Run Code At Same Time

Status
Not open for further replies.

mooktion

Vendor
Apr 13, 2005
6
GB
One thing I've noticed.. The wizard sucks!

I created a Save record button... But later had to change the name of that cmd button because of a code I wanted to add to it.

Now I have discovered that when you add code to a wizard created command button, it stops functioning.. Right?? (Or wrong :S)??

Well either way, I would like to create a command button that simply SAVES the record but I have some form validation coding and I need the validation coding to be executed on the click of the SAVE button. The coding is below:

Private Sub cmdSaveRec1_Click()
ConfirmEntries
End Sub


The question summarised:
The validation works and it runs the ConfirmEntries function, however it doesn't save the record.. How can I make it do both?


Thank you so, so, so much guys for any help at all. I appreciate it.
 
it depends on when you want the record save - i assume you wantit saved after the validation. try this:

Private Sub cmdSaveRec1_Click()
ConfirmEntries
docmd.runcommand.accmdsaverecord
End Sub

that should work. let me know

lee


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top