hey everyone working on a DCount and having probs on the criteria
this is what i have atm, it's the criteria thats the problem, i just dont really get what it's meant to be
i need to check whether the date and period entered have already been entered
cheers
this ones killing me!
Dim DateEntered As Date
Dim PeriodEntered As Integer
Date.SetFocus
Date.Text = DateEntered
cboPeriod.Value = PeriodEntered
If DCount("[Date] & [Period]", "tblRIC1Bookings", "[Date] = DateEntered & [Period] = PeriodEntered") = 0 Then
MsgBox ("This booking is acceptable")
DoCmd.GoToRecord , , acNewRec
ElseIf DCount("[Date] & [Period]", "tblRIC1Bookings", "[Date] = DateEntered & [Period] = PeriodEntered") = 1 Then
MsgBox ("This booking is acceptable, but please be aware that there's another class in the RIC at this time.")
DoCmd.GoToRecord , , acNewRec
ElseIf DCount("[Date] & [Period]", "tblRIC1Bookings", "[Date] = DateEntered & [Period] = PeriodEntered") = 2 Then
MsgBox ("Sorry, the RIC is booked out completely, please consider another date.")
End If
this is what i have atm, it's the criteria thats the problem, i just dont really get what it's meant to be
i need to check whether the date and period entered have already been entered
cheers
this ones killing me!