Form Msgbox if field B is not null

likecricketilovesit

New member
Local time
Today, 06:36
Joined
Aug 25, 2009
Messages
6
Hello, I wonder if you can help me!
I am trying to remind user via msgbox of subform to enter data in revision field if revA field is not empty.

I have tried this out on the subform before update, however msgbox doesn't seem to appear!

Private Sub Form_BeforeUpdate()
If Not IsNull(Me.Revision) Then
If IsNull(Me.revA) Then
MsgBox "fldB is required", vbOKOnly
Cancel = True
End If
End If
End Sub

Any thoughts and help would be ever so appreciated thanks Simon.
 
Presumably the first field (Me.Revision) is populated? Try this:

If Len(Me.revA & vbNullString) = 0 Then
 
Hi Paul, many thanks for your suggestion. Worked a treat! Thanks for your help Simon
 
Happy to help Simon, and welcome to the site!
 

Users who are viewing this thread

Back
Top Bottom