Unknown error message

  • Thread starter Thread starter mjcavana
  • Start date Start date
M

mjcavana

I am trying to run a subform from text box input and I am getting this
message

"Microsoft Office Access can't find the field '|' referred to in
expression"

what does this mean?

'|' is not in my code. This message is only showing up when I click on
the cmd button to run the subform.
 
What's the actual code that's running when that message is raised?
 
yeah, i got that the other day, can't remember why now, sorry.

It was pretty str8 forward.
 
Hi.
what does this mean?

It means that either a column is using a Reserved word as its name, or that
the record source of the bound form has been changed after the form was
created, but the required change to the form to match the new record source
was forgotten about.
'|' is not in my code.

Of course not. That's the placeholder in the error message code for the
name of the column (control source) that the text box control is bound to,
which is missing either because the Reserved word is being used for its
intended use (not the column name assigned by the Access developer), or
because the column is not in the form's record source.

If you want to avoid such unhelpful error messages in the future, never use
Reserved words as object names, never accept the assigned name that Access
gives you when a control is created on a form or report and you ever use
that control's name in code or an expression, and always use the control's
name, not the control's source, in VBA code. For example, if a bound text
box is named StartDate because its control source is the column StartDate in
the table, then change the name to txtStartDate if you ever use that control
in either VBA code or in an expression, and use _only_ txtStartDate in the
code, _not_ StartDate.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blog: http://DataDevilDog.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 

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

Back
Top