If DCount("eventnumber", "newquery", _
"[regionaldirectorcode]= " & glblDirCode) = 1 Then
MsgBox "Your region has already assigned event number " & Me.EventNumber _
& vbCrLf & "Your region's next event number is " & Me.txtNxtEventNum, vbExclamation, "Error"
Cancel = True
Exit Sub
End If
The above does not work even though conditions satisfy all parts of the Dcount function.
I’ve actually put in 2 events with number 9 & the criteria equalling 1300 for both regionaldirectorcode and glblDirCode while testing this function out. Any hints where to look? There’s actually more to this function that works but that part just generates an error message if the eventnumber entered is greater that than the value in an unbound on the form.
"[regionaldirectorcode]= " & glblDirCode) = 1 Then
MsgBox "Your region has already assigned event number " & Me.EventNumber _
& vbCrLf & "Your region's next event number is " & Me.txtNxtEventNum, vbExclamation, "Error"
Cancel = True
Exit Sub
End If
The above does not work even though conditions satisfy all parts of the Dcount function.
I’ve actually put in 2 events with number 9 & the criteria equalling 1300 for both regionaldirectorcode and glblDirCode while testing this function out. Any hints where to look? There’s actually more to this function that works but that part just generates an error message if the eventnumber entered is greater that than the value in an unbound on the form.