T
T5925MS via AccessMonster.com
Need help solving a type mismatch error on the following code:
Many thanks!
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Limits the number of records allowed
'based on the field FloorProgMaxObservations
If DCount("*", "tblFloorProgAudit", "[AuditID] = _
" & Me.AuditID.Value & "" And _
"[FloorProgCriteriaID] = " & _
Me.FloorProgCriteriaID.Value & "" And _
"[AuditorID] = '" & Me.AuditorID.Value & "'") = _
Me.FloorProgMaxObservations.Value Then
MsgBox "You're attempting to exeed the maximum _
number of observation allowed for this criteria _
set. Click OK and then delete this observation."
Cancel = True
End If
End Sub
Many thanks!
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Limits the number of records allowed
'based on the field FloorProgMaxObservations
If DCount("*", "tblFloorProgAudit", "[AuditID] = _
" & Me.AuditID.Value & "" And _
"[FloorProgCriteriaID] = " & _
Me.FloorProgCriteriaID.Value & "" And _
"[AuditorID] = '" & Me.AuditorID.Value & "'") = _
Me.FloorProgMaxObservations.Value Then
MsgBox "You're attempting to exeed the maximum _
number of observation allowed for this criteria _
set. Click OK and then delete this observation."
Cancel = True
End If
End Sub