Hello,
I am new to VB&Access and inherited a project. I have a form with multiple buttons and if one is clicked then a few fields under the buttons are highlighted. Different fields are selected/highlighted depending on what button I click. I have managed to write VB code to throw up and error if a field is null, but that doesn't help me much because on a different button click that field might not need to be filled in.
I am wondering how I can do a check if the field is highlighted, if so then that AND my If NotNull code will be sufficient.
Currently this is the only code I have:
Thank you for any help!
** Edit **
[IMGNOTHUMB]http://bytes.com/attachments/attachment/5525d1318882813/capture.jpg[/IMGNOTHUMB]
I am new to VB&Access and inherited a project. I have a form with multiple buttons and if one is clicked then a few fields under the buttons are highlighted. Different fields are selected/highlighted depending on what button I click. I have managed to write VB code to throw up and error if a field is null, but that doesn't help me much because on a different button click that field might not need to be filled in.
I am wondering how I can do a check if the field is highlighted, if so then that AND my If NotNull code will be sufficient.
Currently this is the only code I have:
Code:
Private Sub Command147_GotFocus() If IsNull(WorkRequested) = True Then MsgBox "Required field: The Work Requested field must be filled in." End If End Sub
** Edit **
[IMGNOTHUMB]http://bytes.com/attachments/attachment/5525d1318882813/capture.jpg[/IMGNOTHUMB]
Comment