hovercraft
Technical User
Greetings,
I'm getting error code 2427 "You entered an expression that has no value." (well it does to me!)
This error only happens when I use RunCommand, FilterByForm then enter my filter criteria and press the "Toggle Filter" button ... and there is no records matching.
I have no idea where to put the error handling code since it's generated from the Toggle Filter Button.
I've tried placing it under "Private Sub Form_Error(DataErr As Interger, Response As Interger)"
and I've tried it under "Private Sub Form_Filter(Cancel as etc...)"
The code I'm using is
Does anyone know where I should put the code? or if my code is just plain wrong.
Any help would be great, Thanks in advance!
Hovercraft
I'm getting error code 2427 "You entered an expression that has no value." (well it does to me!)
This error only happens when I use RunCommand, FilterByForm then enter my filter criteria and press the "Toggle Filter" button ... and there is no records matching.
I have no idea where to put the error handling code since it's generated from the Toggle Filter Button.
I've tried placing it under "Private Sub Form_Error(DataErr As Interger, Response As Interger)"
and I've tried it under "Private Sub Form_Filter(Cancel as etc...)"
The code I'm using is
Code:
Const conMyError = 2427
On Error goto myerror
myerror:
If DataErr = conMyError Then
Response = acDataErrContinue
MsgBox "There are no Records"
end if
End Sub
Does anyone know where I should put the code? or if my code is just plain wrong.
Any help would be great, Thanks in advance!
Hovercraft