Move Focus on New Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that contains a tab control - on the last tab, I have a
button that saves the current record, and opens a new one. I would like to
have the form go back to the first tab when the new record opens, but I
cannot figure out how to make that happen. I created the button using the
wizard and then added to it. This is the code I currently have on the button:

Private Sub SaveRecordButton_Click()
On Error GoTo Err_SaveRecordButton_Click

Me.Dirty = False
DoCmd.GoToRecord , , acNewRec

Exit_SaveRecordButton_Click:
Exit Sub

Err_SaveRecordButton_Click:
MsgBox Err.Description
Resume Exit_SaveRecordButton_Click

End Sub

To be honest, I am not sure what the Err and Exit parts are for, nor do I
know if I need them there - the wizard did it!

Thanks,
Tara
 
on design view of subform from main menu select view + tab order then you
can design your new tab order as clicking and dragging the fields in order
which you want...
 
Back
Top