Hi, I think this should be a relatively easy macro but I just can't get it to work.
When someone enters the date of a booking I want a message box, or warning to appear if there are already too many bookings for that date.
I can't get the Dcount to work based on the text box. I have tried a few options, I managed to get it to recognise the text box I think, but then I would get another error.
I then had a crash issue and lost the code. It was something like this:
Code:
Dim intCount As Integer
intCount = DCount("[OrderNumber]", "[tblDelivery]", "[DelDate] = '" & Me.[DelDate].Value & "'")
MsgBox "There are " & intCount & " bookings on this date."