Next Consecutive number

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

Guest

Have a report based on a query. Data is only entered once
in the table. In query criteria I type <=50 which shows
50 records of same data. One of the fields is called
Pallet#. Pallet number when entered into table is always
1. I need it to go to the next consecutive number every
four records after running this query. Example: Record 1-
4 would say Pallet#1, Record 5-9 would say Pallet#2.
Right now all pallet#'s are 1. Cannot find any way of
doing this other than doing a very long Iff statement.
Can you help! Have looked everywhere on internet &
Microsoft.com.
 
Have a report based on a query. Data is only entered once
in the table. In query criteria I type <=50 which shows
50 records of same data. One of the fields is called
Pallet#. Pallet number when entered into table is always
1. I need it to go to the next consecutive number every
four records after running this query. Example: Record 1-
4 would say Pallet#1, Record 5-9 would say Pallet#2.
Right now all pallet#'s are 1.


It sounds like the pallet# field is useless, why don't you
get rid of it?

You can display those pallet numbers using a little trick.
Add a text box named txtLineCount to the detail section, set
its control source expression to =1 and Running Sum property
to Over All.

Then the pallet number text box can display what you said
you wanted by using the expression:
="Pallet#" & (txtLineCount \ 5 + 1)
 
Thank you Soooo much. This worked like a charm. I knew
there was a way to do it. You are a genius......
 
Back
Top