update fields?

G

Guest

Dear all,

I have a table with 7 fields. I need to generate a report to show all the
fields of the table. My problem is: I can not show the really values of the
fields. I need to show them as 0 if the values greater or equal to 0, and if
they were less than 0 then I need to show them as they were. I cannot change
any values in the table, just need show them different on the report.

For example, I have a record in the tabel with values of : 30, 20, 20, 12,
0, -2, -13, but I need their values show on the report as: 0, 0, 0, 0, 0, -2,
-13.

What can I do for it? how could I change all of the greater than 0 field to
0 at the same time?

Thank you very much,

Blinda
 
G

Guest

Use the following example as the Control Source of a txtbox in your report.

= IIf([YourFieldName]<0,0,[YourFieldName])

Change "YourFieldName" to the actual name of the field that contains the
data to be evaluated ...

R. Hicks
 
G

Guest

It works well for me. Thanks.

Ricky Hicks MVP said:
Use the following example as the Control Source of a txtbox in your report.

= IIf([YourFieldName]<0,0,[YourFieldName])

Change "YourFieldName" to the actual name of the field that contains the
data to be evaluated ...

R. Hicks

Blinda said:
Dear all,

I have a table with 7 fields. I need to generate a report to show all the
fields of the table. My problem is: I can not show the really values of the
fields. I need to show them as 0 if the values greater or equal to 0, and if
they were less than 0 then I need to show them as they were. I cannot change
any values in the table, just need show them different on the report.

For example, I have a record in the tabel with values of : 30, 20, 20, 12,
0, -2, -13, but I need their values show on the report as: 0, 0, 0, 0, 0, -2,
-13.

What can I do for it? how could I change all of the greater than 0 field to
0 at the same time?

Thank you very much,

Blinda
 

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