creating a link between two field entries that ensures data entry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my database I have two fields - one called "contract date set" which is a
tick box. And one called "contract date" which is a date entry.

What I want to happen, is that if you tick the "contract date set" box -
then you HAVE to complete the "contract date" field.

Hoping for some help - tks.
 
The place to do this is in the Form's Before Update event:

Private Sub Form_BeforeUpdate(Cancel As Integer)

With Me
If .[contract date set] And IsNull( .[contract date]) Then
MsgBox "Contract Date Required If Contract Date is Set"
Cancel = True
.[contract date].SetFocus
End If
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top