Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

What's causing error 2465?

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Application.StartupPath  
Author Message
Lars Brownies

External


Since: Mar 12, 2009
Posts: 10



(Msg. 1) Posted: Tue May 05, 2009 6:25 pm
Post subject: What's causing error 2465?
Archived from groups: microsoft>public>access (more info?)

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? 
Back to top
Login to vote
Graham Mandeno

External


Since: May 6, 2009
Posts: 2



(Msg. 2) Posted: Tue May 05, 2009 9:25 pm
Post subject: Re: What's causing error 2465?
Archived from groups: per prev. post (more info?)

Hi Lars

Have you tried commenting out your "On Error GoTo" line?

That way, if the error is occurring in that function, the code execution
should break at the offending line.

Incidentally, I don't think it is causing the problem, but the .Form in
front of .Filter and .FilterOn is redundant, because Forms!frmRequest is
already a Form object.

Also, Forms!frmRequest.Recordset can be replaced by .Recordset, because you
are within the With block.

 >> Stay informed about: What's causing error 2465? 
Back to top
Login to vote
Lars Brownies

External


Since: Mar 12, 2009
Posts: 10



(Msg. 3) Posted: Wed May 06, 2009 3:25 pm
Post subject: Re: What's causing error 2465?
Archived from groups: per prev. post (more info?)

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? 
Back to top
Login to vote
Graham Mandeno

External


Since: May 6, 2009
Posts: 2



(Msg. 4) Posted: Wed May 06, 2009 6:25 pm
Post subject: Re: What's causing error 2465?
Archived from groups: per prev. post (more info?)

Hi Lars

Is the error still occurring, but only in the MDE?

One way to track down the line causing the error is to add line numbers to
every line in the procedure, then include Erl (the error line) in your error
message.
 >> Stay informed about: What's causing error 2465? 
Back to top
Login to vote
Lars Brownies

External


Since: Mar 12, 2009
Posts: 10



(Msg. 5) Posted: Thu May 07, 2009 1:25 pm
Post subject: Re: What's causing error 2465?
Archived from groups: per prev. post (more info?)

"Unfortunately" the error hasn't appeared anymore.
I'll add the line numbers. Thanks for the tip.

Lars

"Graham Mandeno" wrote in message

>> 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? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Subform causing duplicate records? - I am trying to do a Purchase Order database. I need a subform in the PO Data Entry Form since there are usually multiple items in the PO. I have a command button to Print PO but I end up with a report for each item in the subform. This is the SQL...

error - thr file you are trying to open is in a different format than specified by the file extension. --- frmsrcurl:

free error - while free from malloc'memory. system error

Error Message - User has Access 2003 SP3 Her database opens to a switchboard. She clicks an item "enter new request" and she's supposed to get a list of people's names, including her own. Instead she gets, "Inquery expresion qryformtravelreg.otheratt...

Error!! No Code #! - In an AR database, I can go into a customer and view and print invoices and add new ones, but I can not print an aging report, it just comes up with an error but no reference or code number. How can I repair the database so I can run a report?
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]