L
Lori
I have a form and subform. In the subform, I want to allow entry only if one
of the fields in the main form has one of two values. This is the code I put
in the BeforeUpdate event of the subform but nothing happens. Any
suggestions would be great - especially if there was a way I could disable
the location field in the subform. The subform is in tabular form for
multiple records (not datasheet) Thank you.
If (Me.Parent![Location] = "MSH" Or Me.Parent![Location] = "SSH") And
([Location] = " " Or [Location] = Null) Then
MsgBox ("With Still Hunt, Location Must be Entered Here")
Cancel = True
End If
If (Me.Parent![Location] <> "MSH" And Me.Parent![Location] <> "SSH") And
([Location] <> " " And [Location] <> Null) Then
MsgBox ("Location Can Only Be Entered Here with Still Hunt")
Cancel = True
End If
of the fields in the main form has one of two values. This is the code I put
in the BeforeUpdate event of the subform but nothing happens. Any
suggestions would be great - especially if there was a way I could disable
the location field in the subform. The subform is in tabular form for
multiple records (not datasheet) Thank you.
If (Me.Parent![Location] = "MSH" Or Me.Parent![Location] = "SSH") And
([Location] = " " Or [Location] = Null) Then
MsgBox ("With Still Hunt, Location Must be Entered Here")
Cancel = True
End If
If (Me.Parent![Location] <> "MSH" And Me.Parent![Location] <> "SSH") And
([Location] <> " " And [Location] <> Null) Then
MsgBox ("Location Can Only Be Entered Here with Still Hunt")
Cancel = True
End If