Error message 2465

J

jen85

Hi. I am relatively new to access. I have created a form in a database that
my company will use to enter in budget information. Everything on the form is
correct however when i attempt to save (or move to next record) i get this :
"runtime error 2465.
switchboard cant find field "reports to" in your expression"

i do not know much about the coding, and im not sure how to fix this.
it does save the record, and after i hit "end" on the error message, it
moves to next record but since people will be using this, i would like to fix
the problem.
Does anyone know how to fix this without going into the SQL?

Thanks!
 
C

Clifford Bass

Hi,

Do you have any macros or event procedures associated with the form or
the form's various controls (text boxes, combo boxes, buttons, etc.)? If so,
what?

Clifford Bass
 
J

jen85

no i dont believe so. the form has a switchboard, which is the main frame
when the form opens up, kind of like control board etc.
i was trying to see if i could figure out the SQL problem on my own without
assistance and its too hard for me. But i located the error in the SQL and
this is what it says:

Private Sub Form_AfterUpdate()
' Requery the ReportsTo combo box after a record has been changed.
' Then, either show the errormsg label if no file name exists for
' the employee record or display the image if there is a file name that
' exists.
Me!ReportsTo.Requery
On Error Resume Next
showErrorMessage
showImageFrame
If (IsRelative(Me!ImagePath) = True) Then
Me![ImageFrame].Picture = path & Me![ImagePath]
Else
Me![ImageFrame].Picture = Me![ImagePath]
End If
End Sub

what does this mean and how can i edit it so that each time a new record is
added or a record is changed, the error message doesnt appear?
thanks!
 
C

Clifford Bass

Hi,

Actually that is Visual Basic for Applications (VBA) code. Not SQL.
But I am confused. You say you created the form. This is code that someone
had to enter. Is it perhaps associated with the switchboard form and not
with your form? What is your form's name? While you are viewing this
particular code, what does the code window's title bar state where it says
"Form_?????? (Code)". The original error message would seem to indicate that
the error is with the switchboard form--that it cannot find a field (text
box?) named "ReportsTo". However, that there is an After Update event being
fired on the switchboard form when you save data on your form is really odd!
If there no longer is a "ReportsTo" field on the switchboard, you could just
get rid of the "Me!ReportsTo.Requery" line. Maybe better to place an
apostrophe in front--that will turn the line into a comment, which does not
get executed, but will leave it there in case it needs to be reactivated.
You could check the switchboard form to see if the "ReportsTo" field has been
renamed to something else. If so, change the name in the Requery line.

Hope that helps,

Clifford Bass
 
J

jen85

THANKYOU SO MUCH!!! I am so excited that it works now!
what it was was that on the switchboard there was a command there to
automatically go to reports of records which if they were updated, im
guessing the report would be wrong.
so i deleted the command, and placed the apostrophe in front of the message
like you said and it worked!
thanks sooo much! really helpful!

Clifford Bass said:
Hi,

Actually that is Visual Basic for Applications (VBA) code. Not SQL.
But I am confused. You say you created the form. This is code that someone
had to enter. Is it perhaps associated with the switchboard form and not
with your form? What is your form's name? While you are viewing this
particular code, what does the code window's title bar state where it says
"Form_?????? (Code)". The original error message would seem to indicate that
the error is with the switchboard form--that it cannot find a field (text
box?) named "ReportsTo". However, that there is an After Update event being
fired on the switchboard form when you save data on your form is really odd!
If there no longer is a "ReportsTo" field on the switchboard, you could just
get rid of the "Me!ReportsTo.Requery" line. Maybe better to place an
apostrophe in front--that will turn the line into a comment, which does not
get executed, but will leave it there in case it needs to be reactivated.
You could check the switchboard form to see if the "ReportsTo" field has been
renamed to something else. If so, change the name in the Requery line.

Hope that helps,

Clifford Bass

jen85 said:
no i dont believe so. the form has a switchboard, which is the main frame
when the form opens up, kind of like control board etc.
i was trying to see if i could figure out the SQL problem on my own without
assistance and its too hard for me. But i located the error in the SQL and
this is what it says:

Private Sub Form_AfterUpdate()
' Requery the ReportsTo combo box after a record has been changed.
' Then, either show the errormsg label if no file name exists for
' the employee record or display the image if there is a file name that
' exists.
Me!ReportsTo.Requery
On Error Resume Next
showErrorMessage
showImageFrame
If (IsRelative(Me!ImagePath) = True) Then
Me![ImageFrame].Picture = path & Me![ImagePath]
Else
Me![ImageFrame].Picture = Me![ImagePath]
End If
End Sub

what does this mean and how can i edit it so that each time a new record is
added or a record is changed, the error message doesnt appear?
thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top