With regard to your question: Is the "TypeOfSurgery" control on the
form a combo box where the rowsource for the combo box from a another
No, the display control: is a combo box
row source type: Value List
row source: Cardiac Surgery, Colon Surgery, Hip Replacement
bound column 1
column count 1
What I wanted to accomplish is this: If the TypeofSurgery is Colon
Surgery, I wanted the OralAntibiotics to have either a Y or N in that
If other than Colon Surgery, the cursor would move to the next
appropriate field, that being "AntibioticAllergy".
After some work this weekend here is the answer.
There were two Procedures built:
One on enter:
Private Sub *** Antibiotics_Enter()
If Me.TypeofSurgery <> "Colon Surgery" Then
The second on exit:
Private Sub *** Antibiotics_Exit(Cancel As Integer)
If Me.TypeofSurgery ="Colon Surgery" Then
If IsNull(Me.OralAntibiotics) Then
MsgBox "Data Entry Required - Enter a Y or an N!"
Cancel = True
I certainly appreciate everyone's help on this just being able to
discuss this with someone and coming back fresh after awhile made a
lot of difference.
Stewart your code gave me the idea of breaking this action into two
procedures, a special thanks to you as well.