Link to home
Start Free TrialLog in
Avatar of J G
J G

asked on

message box formulas

I am using the following message box code. .

 If OK, I want to open a subform.

If Cancel, I want to insert a null value into a text box, and click on a form button

Could you tell me the code I need to insert into the VBA below:


Select Case MsgBox("Item Not Found.  Add new item?", vbOKCancel, "Missing Data")
Case vbOK:
'code
Case Else
'code
End Select
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

me.txtbox = NULL
Call cmdYourCommandButtonsName_Click
Avatar of J G
J G

ASKER

When I compile the code I get the following error:

Compile Error:
Invalid Use of the ME Keyword
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial