I have Purchase date field in the database that is not mandatory field. But I want if someone write a date in this field, the combobox under it for Yes and no to be mandatory.
Interpretation is a little open here. I'm assuming you mean a date entered in [blue]Purchase Date[/blue] means the Yes/No field should be set to [blue]Yes[/blue]. This makes the code in the [blue]AfterUpdate[/blue] event of [blue]PurchaseDate[/blue] look like:
I am fine. How are you TheAceMan1? Hope all is well with you. I am happy to hear from you.
There are two fields.
1) Purchase date: can be blank. But if staff enter purchased date, they must choose an option from the combobox below it. Shipping Needed: Yes or No.
In the forms [blue]BeforeUpdate[/blue] event, copy/paste the following:
Code:
[blue] If Not IsNull(Me![Purchase Date]) And IsNull(Me![Shipping Needed]) Then
MsgBox "You must make a selection in Shipping Needed!"
Me![Shipping Needed].SetFocus
Cancel = True
End If[/blue]
Yes. this worked perfectly. But I want to give the user to input the data. rightnow, it gives the message box but witout an option to go and enter information
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.