FrmBookings is a subform linked to the form FrmParty. The DCount function
checks for previous bookings and it works fine but why do I need such a
long-winded syntax ie Forms![FrmParty].Form![FrmBookings]![EventDate] in the
conditon part of the Dcount.
Private Sub SessionCode_BeforeUpdate(Cancel As Integer)
If DCount("[EventDate]", "TblBookings", "[EventDate] =
Forms![FrmParty].Form![FrmBookings]![EventDate]") > 0 Then
MsgBox ("Sorry this is already booked out!")
End If
End Sub
How can I slim down this line? Me.[EventDate] does not work - why?
Many thanks Geoff