manipulating data before it goes into a report

J

john

Hello!
I have a form based on a query that places the data into a
report. Pretty basic, but now I am faced with formatting
the value based on what the query returns. For example, I
have a "Flow" that will pull the value from the underlying
query and report it similar to "0-10 GPM" on the report.
What I want to do, is if there is a "0" present to just
display the other values. So from the example above, just
so "10 GPM" on the report. Any suggestions or ideas would
be very appreciated!

Thanks for your help and time!

John
 
L

Larry Linson

Use a calculated control in the Query. If it is always "0- " never "0 - ",
the following will work for a field named "A":

NewVal: IIF (Left(A,3)="0- ", Right(A,Len(A)-3), A))

If your need is more complex than stated, so will the expression be more
complex than the above.

Larry Linson
Microsoft Access MVP
 
Top