Here is some info to help you better understand:
- Controls (Y/N) are on FORM (frmVendor_DataEntry) in Access 2007
- Form fed by query (qryVendors_Active)
- 4 Y/N controls involved (COIRequired, ContractRequired, SafetyRequired, and PGHOwned)
If a vendor is PGHOwned, then the other requirements should always be "FALSE". Therefore, when someone changes the value of PGHOwned to TRUE, I want a msgbox to ask them to confirm the change.
If "Yes" is selected, I want the code to set the value of the other 3 Y/N controls to FALSE.
If end-user selects "NO", then it should UNDO the change and set the value of PGHOwned back to FALSE.
I started it something like this . . .but acknowledge how far off I am with some of the syntax. I appreicate any help.
Expand|Select|Wrap|Line Numbers
- Private Sub PGHOwned_Change()
- MsgBox("YOU HAVE CHANGED INFO FOR THIS VENDOR"&vbCr&"Continue",vbYesNo,"WARNING")
- If <msgboxname>.Value = True then
- Me!COIRequired.Value=False
- Me!ContractRequired.Value=False
- Me!SafetyRequired.Value=Fale
- else
- <statement about Docmd.undo???>
- end if
- End Sub