J G
asked on
message box in access
I am using the following vba for a message box in access. If the user hits OK, I want a new sub form to open. If the user hits Cancel, I want to reset/reopen existing form. What is wrong with my VB?
Function Message()
Dim MSGBOXRSP As Integer
MSGBOXRSP = MsgBox("Item Not Found. Add new item?", vbOKCancel)
If LResponse = vbOK Then
(Open New Subform)
Else
(Reopen/ResetCurrentForm)
End If
End Function
Function Message()
Dim MSGBOXRSP As Integer
MSGBOXRSP = MsgBox("Item Not Found. Add new item?", vbOKCancel)
If LResponse = vbOK Then
(Open New Subform)
Else
(Reopen/ResetCurrentForm)
End If
End Function
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you're welcome
is this a combobox?
do you need help with a NotInList procedure?
is this a combobox?
do you need help with a NotInList procedure?
ASKER
Function Message()
Select Case MsgBox("Item Not Found. Add new item?", vbOKCancel)
Case vbOK:
Case Else
DoCmd.OpenForm "Item_Master"
End Select
End Function