Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runtime error '2465'

Status
Not open for further replies.

Russ1005

Programmer
Dec 13, 2004
96
US
I'm getting runtime error '2465'

Claims Main Menu can't find the field '|' referred to in your expression.

The first DoCmd is highlighted. Any idea what's causing this?

Thanks for your help.

Private Sub Delete_Click()
On Error GoTo Err_Delete_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Delete_Click:
Exit Sub

Err_Delete_Click:
MsgBox Err.Description
Resume Exit_Delete_Click

End Sub
 
Russ1005
Since the code appears to have been created by the standard Delete Record wizard, it appears correct. That would suggest that the problem, in spite of the highlighting of the first DoCmd line, doesn't lie with the code.

The rest of the Error 2465 message is "You may have misspelled the field name, or the field may have been renamed or deleted."

Do you get the error message every time you use the Delete command button, or just with certain records?

Tom
 
I get the error every time the delete button is clicked on any record.
 
I tried creating a new delete command button with the wizard.

After I create a new record and hit the new delete button I get runtime error 7874
Claims Main Menu can't find the object 'customer_claims_check_request.'

If I click the new delete button on an old record, I get the original 2465 error message stated previously.
 
Russ
The rest of error message 7874 is...
You misspelled the object name. Check for missing underscores ( _ ) or other punctuation, and make sure you didn't enter leading spaces.
* You tried to open a linked table, but the file containing the table isn't on the path you specified. Use the Linked Table Manager to update the link and point to the correct path


I am wondering about the last part of the message. Is this a FrontEnd/BackEnd database? If so, is it possible that the links need to be refreshed?

The Delete record command constructed by the wizard should work just fine. So the answer lies somewhere other than in the code.

Tom
 
Yes this ia an Access 2003 app with a SQL Server 2000 backend. I check twice and didn't find any punctuation/spelling problems.

This is gonna sound crazy but I inherited this project and am not sure of the data source name. When I go to "File|Get External Data" there are a couple dozen dsn files listed and I'm not sure which one is correct. Is there a way to determine which one is the right link. I don't see a "refresh" option if there is one.

Also where do I find the full text for these runtime errors?

Thanks for your help.
 
Russ
As for refreshing the links, there is no Refresh button or command.

To refresh the links, go to Tools>Database Utilities>Linked Table Manager. Then see if you can find the correct BackEnd to link to. It will, most probably, have the same name as the FrontEnd with _be appended to the name. In other words, AceData.mdb as a front end would have AceData_be.mdb as a back end.

Do you know how to take it from there to refresh the links?

As for the full text of the Access error message, there is a way to generate the table and that's what I have. I can't lay my hands on the procedure at the moment, but will try and have a look later.

Tom
 
Well I may have misused the term backend but I know the database is SQL Server.

This is an Access 2003 adp file. The only options I have under Tools>Database Utilities> are:

Convert Project
Compact and repaid project
backup project
Switchboard Manager (grayed out)
Make ade file

So to answer your question, no, I don't know how to refresh.
 
Russ
Oh, I improperly assumed you were working with a regular Access .mdb file. I personally haven't worked with .adp files.

I just did a search on Microsoft Office Online and here's a link that shows how to make the connection...not sure if this is helpful, but here it is...

I'll still look for the Access Error Code generation program.

Tom
 
Russ
To generate the Access Error Code table, paste the following into a new Module, and then run it.

Function sRecordAccessErrorMsg()

Dim ADOcnn As ADODB.Connection
Dim ADOrst As ADODB.Recordset

Dim intCounter As Long
Dim intErrornumber As Long
Dim strErrorText As String

Set ADOcnn = CurrentProject.Connection
Set ADOrst = New ADODB.Recordset

ADOrst.Open "tblErrorsAndDescriptions", ADOcnn, adOpenDynamic, adLockOptimistic

With ADOrst
For intCounter = 0 To 32767
.AddNew
!ErrorNumber = intCounter
If IsNull(AccessError(intCounter)) Then
!ErrorDescription = "No Error"
ElseIf AccessError(intCounter) = "" Then
!ErrorDescription = "No Error"
Else
!ErrorDescription = AccessError(intCounter)
End If
.Update
Next intCounter
End With

MsgBox "Completed enumerating errors to the table."

End Function

Tom
 
I followed the directions in the link and refreshed the link to the proper server but I still get the error.

I executed sRecordAccessErrorMsg() in the immediate window but it seems to need a store procedure: tblErrorsAndDescriptions
 
Probably so. Sorry, I forgot that step.

Make a table, with two fields.
ErrorNumber Number Data type. Primary Key. No duplicates.
ErrorDescription Memo Data type

Running the code should store in that.

Tom
 
memo was not a choice in the data type combo box.
 
Russ
If you are talking about an Access table, there is a Memo field.

Tom
 
Russ
Perhaps so. But assuming that you have Access on your computer, start a new database. Make the one table, and the one module.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top