Hi All, I have two forms for user to search for some information in different ways, and i made a form using MsgBox to let user to select which way is wanted. The code is as below
Private Sub Form_Open(Cancel As Integer)
Dim intSelection As Integer
intSelection = MsgBox("Click Yes To View Parts Information By PN,Click No To View By MfgNumber.", vbYesNo, "Please Respond")
Select Case intSelection
Case vbYes
DoCmd.OpenForm "frmPartsInfoByPN"
Case vbNo
DoCmd.OpenForm "frmPartsInfoByMfg"
End Select
Cancel = True
End Sub
At first I missed "Cancel As Integer" and "Cancel = True", and after several tries it works, but still i didn't understand it very well.
Could somebody explain it for me?
Thanks in advance.