Thanks for the tips. I adjusted the form references.
Commenting out the 'on error goto' line is not an option since this is an
MDE and I can't reproduce the error.
Lars.
"Graham Mandeno" wrote in message
>>A user gets error 2465: "Can't find field | which is being refered to in
>>the expression".
>> The error is generated in the following function but the user and I can't
>> reproduce it. The function seems to work fine.
>> Any idea what might cause this error?
>>
>> Thanks,
>>
>> Lars
>>
>>
>> Function fFilterRequest(intChoice)
>> Dim rs As DAO.Recordset
>> On Error GoTo Err_Handler
>>
>> With Forms!frmRequest
>> Select Case intChoice:
>> Case 1: .Form.Filter = "Editor =""" & !fldUser & """" & " AND
>> Date_Ready IS NULL"
>> .Form.FilterOn = True
>> !cmbView = "Pending this employee"
>> .OrderBy = "ID_request"
>> .OrderByOn = True
>> Set rs = Forms!frmRequest.Recordset
>> If rs.RecordCount > 0 Then
>> rs.MoveLast
>> Else
>> MsgBox "This employee has no pending requests."
>> End If
>> Set rs = Nothing
>> Case 2: .Form.Filter = "Datum_Ready IS NULL"
>> .Form.FilterOn = True
>> !cmbView = "Pending all"
>> .OrderBy = "ID_request"
>> .OrderByOn = True
>> Set rs = Forms!frmRequest.Recordset
>> If rs.RecordCount > 0 Then
>> rs.MoveLast
>> Else
>> MsgBox "No pending requests."
>> End If
>> End Select
>> End With
>>
>> Exit_this_function: Exit Function
>> Err_Handler:
>> Dim strError As String
>> strError = "Error: " & Err.Number & ": " & Err.Description
>> MsgBox strError: Call ErrorLog("Generic", "fFilterRequest", strError)
>> Resume Exit_this_function
>> End Function
>>
>>
>
> >> Stay informed about: What's causing error 2465?