trim function

  • Thread starter Thread starter JIM.H.
  • Start date Start date
J

JIM.H.

Hello,
My report use a select query, it brings FName, I put this
field into my report, it works fine, however when I change
control source of this field as '=Trim([FName])', it
return error. What is problem?
Thanks,
Jim.
 
Hello,
My report use a select query, it brings FName, I put this
field into my report, it works fine, however when I change
control source of this field as '=Trim([FName])', it
return error. What is problem?
Thanks,
Jim.
The Computer may have a missing reference.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

See Microsoft KnowledgeBase articles:
283115 'ACC2002: References That You Must Set When You Work with
Microsoft Access'
Or for Access 97:
175484 'References to Set When Working With Microsoft Access' for
the correct ones needed,
and
160870 'VBA Functions Break in Database with Missing References' for
how to reset a missing one.

For even more information, see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Could be a References problem.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
 
You didn't specify what kind of error you are getting. Other responses
address the possibility of a References error. However, if you are getting a
#Name error, you could also have a control and field with the same name.

When creating a report or form with wizards, controls (such as text boxes,
etc.) are given the same name as the underlying Field name by default. This
is fine as long as you don't try to use the Fieldname in an expression. When
you do that, Access doesn't know if FName refers to the textbox or the
Field, so you get a #Name error.

Change the textbox name to txtFName. Save & close the report. Reopen it and
check that your control source expression still refers to [FName].
(sometimes Access will "help" you and change it to txtFName, which is not
what you want).

HTH,
 
Back
Top