Validation Rule

G

Guest

I have a field called "Type" that I want to add to my table. In this field,
I will be using a list box with my own values that I will add. However, if a
person selects one of these values that happens to be "Will not be
incorporated".....I would like them to be required to enter the "reason" in
another text box.

Is there a validation rule/text that can work with this problem? Or...is
that too much to ask? :)

Emmz
 
G

Guest

First, do not name the field Type. Type is a Microsoft reserved word and may
confuse Access.
As to the validation, Use the form's before update event to look for the
value in the list box and if it is "Will not be incorporated", ensure there
is a value in the text box.

If Me.ListBox = "Will not be incorporated" Then
If IsNull(Me.TextBox) Then
MsgBox "Reason Required"
Cancel = True
End If
End If
 

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

Similar Threads


Top