Save Button operations

whitelexi

New member
Local time
Today, 11:25
Joined
Jun 5, 2009
Messages
7
Hi folks,

I have created a nice form which i use to enter data and populate several tables and everything is working okay but i would like to make things a bit easier for myself and thats where i'm having a bit of a problem.

After entering all the data into my form, i hit the SAVE button and the data is transfered to the various tables - as expected, however, the form does not clear the data in anticipation of another set of data unless i click the navigation button at the bottom of the form.

I have tried modifying the VB code behind the form's save button but dont seem to get it right. Here's the code:

---------------------------------------------------------------------
Private Sub btnSave_Click()
On Error GoTo Err_btnSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_btnSave_Click:
Exit Sub
Err_btnSave_Click:
MsgBox Err.Description
Resume Exit_btnSave_Click

End Sub
----------------------------------------------------------------


My hope is that there is someone who can point me in the right direction here.

Many thanks for your anticipated assistance.
 
Add this after the save:

DoCmd.GoToRecord , , acNewRec
 
Right out of the top drawer, that was AWESOME!
Dude u made my day, many thanks, many thanks, many thanks!

It worked well
 

Users who are viewing this thread

Back
Top Bottom