Left Statement Help

Sinfathisar

Registered User.
Local time
Today, 01:30
Joined
Jan 29, 2009
Messages
60
Hi,

I have a text box named Text44 on a subreport. I put this statement into its control source....

=Left([txtOffset],7)

txtOffset the name of another control on the same subreport with control source Offset.

There aren't any other controls on my subreport named txtOffset, but I am still getting ?Error when I open just the subreport, or the main report.

I can't figure out what I am missing.
 
What is the error number and error description?

You do realize that you have not told us what the application is; nor what tables and relationships you have. Some context for for your post could be helpful.
Also, it is considered good practice to name your controls in a meaningful way.
 
You would get an error if txtoffset is empty.

The IsError() function is one way to supress such errors.
 
I am using Access 2007. Text44 is unbound (I am not going to give it a meaningful name until I know if I can get this to work). Offset is a field in my table.

When I run the report, the contents of Text44 display as "?Error" instead of showing data. Txtoffset is not empty.

The report controls are in the details section of the report.

I am trying to format a number that was put into a text field to display 7 characters instead of displaying a very long decimal. I am restricted to not making table changes at this point.
 
Left should work but you could use the Round() function or the Format property of the control.
 

Users who are viewing this thread

Back
Top Bottom