Runtime 2465

  • Thread starter Thread starter Bob R
  • Start date Start date
B

Bob R

Many times when I write an expression I get the following:

Runtime Error 2465
Database can't find the field '|' referred to in your
expression.

What causes this...what am I doing wrong?

Thanks Bob
 
Hi Bob

It sounds like you may have mispelled a field name in your expression. That
would be a good place to start.

Maurice
 
Hi, Bob.

Run-time error 2465 is caused by two things in conjunction:

1.) The record source of the form or report is not correct.

2.) The expression (or code) is referring to the control source of an object
on the form/report (such as a text box), but not the name of that object
(otherwise, you'd get Run-time error 2424 and a message that the field,
control, or property name can't be found).

To fix this, you just need to change the form's/report's record source to
the correct record source. Most likely, it is misspelled. Did you change
the record source for this form or report recently? That would explain the
error you're seeing.

If I were you, I'd change the code to match the name of the object, not the
control source of that object, for future maintainability of your database
application. (But it will still work even if you don't change the name of
the control source to the name of the control.)

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a
message will be forwarded to me. Spammers are free to use my UNALTERED
reply E-mail address. I will *never* get those messages!)
 
I've alse seen 2465 errors occasionally when working with subforms when the
parent form tries to reference the subform or control on a subform and it
hasn't loaded yet, etc.
 
Back
Top