F
forcefield via AccessMonster.com
Hi everyone,
I have a main form, frmMain with a tab control.. There are 2 pages on the tab
control and each page has a subform containing only several option groups
These subforms are linked to main form by Child and Master relationship.
What I would to do is when I click a button on the main form I would like
both the subforms add a new blank page of option groups for user to check. I
was able to get a blank new record for the second page or subform but not
the first page or subform. Can someone please correct my code?
Thanks
Private Sub cmdNew_Click()
On Error GoTo Err_cmdNew_Click
Me.sfrmOne.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.sfrmTwo.SetFocus
DoCmd.GoToRecord , , acNewRec
Exit_cmdNew_Click:
Exit Sub
Err_cmdNew_Click:
MsgBox Err.Description
Resume Exit_cmdNew_Click
End Sub
I have a main form, frmMain with a tab control.. There are 2 pages on the tab
control and each page has a subform containing only several option groups
These subforms are linked to main form by Child and Master relationship.
What I would to do is when I click a button on the main form I would like
both the subforms add a new blank page of option groups for user to check. I
was able to get a blank new record for the second page or subform but not
the first page or subform. Can someone please correct my code?
Thanks
Private Sub cmdNew_Click()
On Error GoTo Err_cmdNew_Click
Me.sfrmOne.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.sfrmTwo.SetFocus
DoCmd.GoToRecord , , acNewRec
Exit_cmdNew_Click:
Exit Sub
Err_cmdNew_Click:
MsgBox Err.Description
Resume Exit_cmdNew_Click
End Sub