G
GD
I'm trying to use a command button on each of 2 forms to enable the user to
switch back and forth and the click of a button. The code I'm using is:
Private Sub GoToCMDM_Click()
DoCmd.OpenForm "frmCMDMSearch", acNormal
DoCmd.Close acForm, "frmCMLabelsDataEntry", acSaveNo
End Sub
Private Sub GoToCMLabels_Click()
DoCmd.OpenForm "frmCMLabelsDataEntry", acNormal
DoCmd.Close acForm, "frmCMDMSearch", acSaveNo
End Sub
It works once for each, but then stops working. And the code for the form
that it stops on changes to:
Private Sub GoToCMDM_Click()
End Sub
Private Sub GoToCMLabels_Click()
DoCmd.OpenForm "frmCMDMSearch", acNormal
DoCmd.Close "frmCMLabelsDataEntry"
End Sub
What am I doing wrong? I'm new at this.
switch back and forth and the click of a button. The code I'm using is:
Private Sub GoToCMDM_Click()
DoCmd.OpenForm "frmCMDMSearch", acNormal
DoCmd.Close acForm, "frmCMLabelsDataEntry", acSaveNo
End Sub
Private Sub GoToCMLabels_Click()
DoCmd.OpenForm "frmCMLabelsDataEntry", acNormal
DoCmd.Close acForm, "frmCMDMSearch", acSaveNo
End Sub
It works once for each, but then stops working. And the code for the form
that it stops on changes to:
Private Sub GoToCMDM_Click()
End Sub
Private Sub GoToCMLabels_Click()
DoCmd.OpenForm "frmCMDMSearch", acNormal
DoCmd.Close "frmCMLabelsDataEntry"
End Sub
What am I doing wrong? I'm new at this.