One Field Required based on another Field

J

joefonseca79

I have a form that has a drop down field called Input_Type that has a
list for Project or Discretionary.

I also have another field on the form that is Capitalizable Y/N.

I need to make the Capitalizable Y/N drop-down required if they select
Project from the Input_Type drop down.

What is the best way to go about this using VB?
 
L

Linq Adams via AccessMonster.com

Something like this; substitute your own message:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Input_Type = "Project" And IsNull(Me.Capitalizable) Then
Cancel = True
MsgBox "A selection must be made from the Capitalizable Combobox when
Input_Type = Project!"
Capitalizable.SetFocus
End If
End Sub
 
Top