nick941741
Registered User.
- Local time
- Today, 08:14
- Joined
- Mar 17, 2009
- Messages
- 21
Hi, I have the following bit of very messy code that I have created to check fields for null values when a user click on a certain button. It it shows an X image next to the fields that are null, but I need it to
1, not show the image if the field is not null and
2, Move to the first empty field to promt the user to complete it...
Any help as always apprectiated.
Hidden_missing is the image (X)
1, not show the image if the field is not null and
2, Move to the first empty field to promt the user to complete it...
Any help as always apprectiated.
Hidden_missing is the image (X)
Code:
Private Sub cmdOpenFormAndAddNewRecord_Click()
If IsNull(Address1) Then
Me!address1_missing.Visible = True
Me!hidden_missing.Visible = True
'DoCmd.GoToControl "Address1"
Else
Me!address1_missing.Visible = False
Me!hidden_missing.Visible = False
End If
If IsNull(PostCode) Then
Me!postcode_missing.Visible = True
Me!hidden_missing.Visible = True
Else
Me!postcode_missing.Visible = False
Me!hidden_missing.Visible = False
'DoCmd.GoToControl "PostCode"
End If
If IsNull(ClientType) Then
Me!clienttype_missing.Visible = True
Me!hidden_missing.Visible = True
Else
Me!clienttype_missing.Visible = False
Me!hidden_missing.Visible = False
End If