required data in combo box

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

Guest

Hello,

I have a form with 20 combo boxes on it for data entry. There are times
when my people need to move to a new record without completing the first
record, so I don't have "REQUIRED" set for all combos. However, I'd like to
somehow tell Access (I'm assuming via code) that:

Combo Box "station" must be filled in if Combo Box "dept" has "upholstery"
as the selection. Can someone help?

Thank you much,
Aaron
 
Aaron said:
Hello,

I have a form with 20 combo boxes on it for data entry. There are times
when my people need to move to a new record without completing the first
record, so I don't have "REQUIRED" set for all combos. However, I'd like to
somehow tell Access (I'm assuming via code) that:

Combo Box "station" must be filled in if Combo Box "dept" has "upholstery"
as the selection. Can someone help?

Thank you much,
Aaron

In the form's BeforeUpdate event, you'll be needing something like this::

If [dept] = "upholstery" Then
If IsNull([station]) Then
MsgBox "You must enter a value for Station"
Cancel = True
End If
End If
 
Back
Top