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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trim Function Won't Work! 1

Status
Not open for further replies.

indyhorses

Technical User
May 24, 2001
10
0
0
JP
The labels report in my database suddenly won't work. When I pull up a simple report to preview and print labels it comes up with #Name in every field. If I try to create a new label I get the following:

"The function you entered can't be used in this expression. *You may have used a DoEvents, LBound, UBound, Spc., or Tab function in an expression
*You may have used an SQL aggregate function, such as Count, in a design grid or in a calculated control or field.
OK.

This is just trying to do a new label. Other reports function fine, except when trying to combine first and last names. Any thoughts?
 
My only "thought" is that your "thoughts" are not sufficiently complete/coherent to generate a "thoughtful" response. You state the "problem" as " ... "Trim Function Won't Work ... " but then you NEVER even state that you are using the "Trim Function", or how or where. I suppose that it must be assumed that you are using Trim in conjunction with something - but how is "it" responsible for "EVERY FIELD" on a report being corrupted?

You have POSSIBLY changed the reports' recordsource property and the new recordsource does not include the fields used on your report --- but this is simply wild conjecture.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
I am having the same problem. It doesn't only occur with TRIM, but I've used format as well. It seems to me that functions cannot be placed in the control source of the report.

It is is definitely not a recordsource problem (i.e. for me), since I can get the report work to display properly on one machine, but cannot get it to work on another machine. So I'm thinking that something is missing from Access.

Any ideas?
 
Functions can be used in the control source, but it sounds like you have a circular reference problem.

For example: CustName = Trim(CustName) doesn't work. It's a circular reference back to itself. Just rename your field to something different and it should work ok. Maq B-)
<insert witty signature here>
 
Thanks for the prompt reply.

I don't think it's a circular problem. I already have the controls named differently, adn it does work on one machine, but doesn't work on another machine.

Any other ideas?
 
Ooooh, that problem. Whole different issue.

The machine it doesn't work on is missing some librarys (DLL's). Open the database on the machine that doesn't work and open up a vb code module. (Any module will do.)

On the menu goto Tools --> References and look at the checked libraries. One of them will have MISSING: in front of it. That's the DLL you need on the machine. Maq B-)
<insert witty signature here>
 
Thanks again. I think that is the problem too. Where would I be be able to obtain the missing DLL?
 
Um, off the machine that works? Maq B-)
<insert witty signature here>
 
Open up an existing module or create a new one from scratch.
Click Tools/References and see if any of the checked references listed have the word 'Missing' in front of the name. I've seen this as the most frequent cause for the symptoms you described. As for fixing it, the 'Missing' reference will display where Access 'Thinks' the file should be. You should be able to search the problematic machine for the correct location or at least be able to see exactly which file if any is really missing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top