Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't find Trim

Status
Not open for further replies.

alvechurchdata

Programmer
Nov 8, 2003
1,737
GB
Customer's just moved a simple wizard-generated report from Access 97 to Access 2003 and it's stopped working. They asked me to take a look and it was the Trim() function in the report fields that was crashing it. I "fixed" it by removing the calls to Trim() so the customer's happy.

I'm still puzzled though. Can anyone explain what's happened?

Geoff Franklin
 
Not sure, but I would check their references to see if there is a missing or broken dll, perhaps caused by version differences (eg ADO 2.5 vs ADO 2.8). I have seen standard code appear to break in the above situation. Good Luck!

Have a great day!

j2consulting@yahoo.com
 
the default libraries used are different in 97 to 2003...

Trim is a part of the Strings class which is automatically included, so I'm not sure why it's not comming up...

--------------------
Procrastinate Now!
 
Checks the References:
when in VBE(Alt+F11), menu Tools -> References ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I'm used to having grief with references but this wasn't any sort of sophisticated application with stacks of DLLs, it was created by the user as a simple table with a wizard report.

The only difference between the two was that the Access 97 implementation referred to the Word 8.0 Object Library whereas this had changed to Word 11.0 in Access 2003.

Surely Access doesn't get its string-handling functions from Word?

Geoff Franklin
 
Surely Access doesn't get its string-handling functions from Word
You're obviously right, but as soon as the VBAProject has broken reference, none of the VBA standard function works.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
as soon as the VBAProject has broken reference
But there's no VBA and there isn't a project and that's what's annoying me. I know I've got to live with this sort of misery on jobs with all sorts of clever stuff but this was just a small table with a quick ad-hoc report that one of the users had put together using the wizard.

I guess the wizard must have introduced some dependencies but it's a poor product when a user can't move a simple report from one version to another.

No matter. They're happy that it's working now and that it might have been caused by them jumping straight from 97 to 2003. Perhaps they should have upgraded from 97 to 2000 four years ago.

Geoff Franklin
 
But there's no VBA
But yes in your report.
Trim IS A VBA FUNCTION.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top