Trim function doesn't work

W

Walter

I cannot get the Trim fuction working in Access2000.
The error message is;

Undefined Function Trim in Expression.

Here is the SQL

UPDATE tblProducts SET tblProducts.ProductID = Trim
([tblProducts]![ProductNbr]);

Both fields are of type text and 50 charactters long.

The same problem occurs for some other text functions. I
have reinstalled office but this does not seem to help.

Does anyone have any ideas?

Walter
 
W

Wayne Morgan

Open a code window (Alt+F11) and go to Tools|References. Are any listed as MISSING? Also,
compare these to a machine that does work to see if you have one unchecked that should be
checked. Another thing to check, there are several references available that have the name
"Visual Basic for Applications". Make sure the path listed is the same as the path listed
on a machine that works and has the same version of Access you do.
 
F

Fredg

Walter said:
I cannot get the Trim fuction working in Access2000.
The error message is;

Undefined Function Trim in Expression.

Here is the SQL

UPDATE tblProducts SET tblProducts.ProductID = Trim
([tblProducts]![ProductNbr]);

Both fields are of type text and 50 charactters long.

The same problem occurs for some other text functions. I
have reinstalled office but this does not seem to help.

Does anyone have any ideas?

Walter
Walter,

The machine has a missing reference.
Open any module in Design view.
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.
 

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