Hi Everyone,
I am VERY new to VBA so please bear with me! I am using Access 2003 and I have a form that when it is loaded it prompts the user to answer a yes or no question. When yes is selected I want the form to open in Edit mode and when no is selected I want the form to open in Add mode.
Below is the code that is attached to the On Load Event. It works perfectly when yes is selected and opens the form in Edit mode. However, when no is selected, the form still opens in Edit mode. I have tried the same code in the On Open Event with the same results. It should also be noted that the form contains a subform.
I have been searching the web all morning to try and figure this out with no avail. Can anyone provide me with detailed directions on how to solve this problem?
Thanks in advance!
Private Sub Form_Load()
If MsgBox("Is this a Re-Capture?", vbYesNo + vbInformation, "Information Needed") = vbYes Then
DoCmd.RunMacro "Search Message MACRO"
DoCmd.RunCommand acCmdFind
Else
DoCmd.OpenForm "FORM - Male Capture Information", acNormal, , , acFormAdd, acWindowNormal, OpenArgs
End If
End Sub