Skipping Report Detail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following fields in a table
ProductName, LocationName, Warehouse, UnitsIn, UnitsOut

I run querys to sort by either of these fields or their combunations and then create a report.
In the report detail I have:

LABELS = Product Whse Location Qty.
CONTROL = ProductName Warehouse LocationName =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",
[SumOfUnitsIn]-[SumOfUnitsOut])

I 've tried =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",[LoactionName]) for the control under location and setting it to can shrink and similar for the other controls but get an "#error" when printed or previewed.

How do I skip to the next detail if the qty = 0 so that it does not preview or print. Is there a formula or procedure that I can put in OnFormat or On Print. Help!!
 
First, fix the syntax of the IIf ... the first argument is supposed to be a
logical expression, not a numeric one. Then, try it again, and then follow
up here if it still doesn't work.

Larry Linson
Microsoft Access MVP


KL Fitzpat said:
I have the following fields in a table
ProductName, LocationName, Warehouse, UnitsIn, UnitsOut

I run querys to sort by either of these fields or their combunations and then create a report.
In the report detail I have:

LABELS = Product Whse Location Qty.
CONTROL = ProductName Warehouse LocationName =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",[SumOfUnitsIn]-[SumOfUnitsOut])

I 've tried =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",[LoactionName]) for
the control under location and setting it to can shrink and similar for the
other controls but get an "#error" when printed or previewed.
How do I skip to the next detail if the qty = 0 so that it does not
preview or print. Is there a formula or procedure that I can put in OnFormat
or On Print. Help!!
 
KL said:
I have the following fields in a table
ProductName, LocationName, Warehouse, UnitsIn, UnitsOut

I run querys to sort by either of these fields or their combunations and then create a report.
In the report detail I have:

Sorting the query usually won't do it. You should use
Sorting and Grouping to specify how the report
s data should be ordered.

LABELS = Product Whse Location Qty.
CONTROL = ProductName Warehouse LocationName =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",
[SumOfUnitsIn]-[SumOfUnitsOut])

I 've tried =IIF((SumOfUnitsIn]-[SumOfUnitsOut]),"",[LoactionName])
for the control under location and setting it to can shrink and
similar for the other controls but get an "#error" when printed
or previewed.

A common cause of #Error is when the text box has the same
name as one of the fields in the expression, in this case I
suspect the text box is named LocationName. If so, change
the text box's name to something else such as
txtLocationName

How do I skip to the next detail if the qty = 0 so that it does
not preview or print. Is there a formula or procedure that I
can put in OnFormat or On Print. Help!!

If you don't want records with Qty = 0, then you should
filter them out in the report's record source query. It
looks like you want the SumOfUnitsIn field to have a
criteria of <>SumOfUnitsOut, but without seeing your query
I can't be sure.
 
Back
Top