Query

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

I have a very simple database, storing information for
production Kanban cards. The user inputs how many cards
there are (ie. 1 to 12) and many other fields, and then
all cards are to be printed based on other requirements.
The only additional thing I want to automate is the
changing of card numbers. Right now I have to go in and
manually change the field from 1 to 2, 2 to 3,...8 to 9,
print individually till all have been printed. I was
trying to get this to work in a query with the IFF
statement,
IFF([start]=[finish],"",[start]+1)
 
I have a very simple database, storing information for
production Kanban cards. The user inputs how many cards
there are (ie. 1 to 12) and many other fields, and then
all cards are to be printed based on other requirements.
The only additional thing I want to automate is the
changing of card numbers. Right now I have to go in and
manually change the field from 1 to 2, 2 to 3,...8 to 9,
print individually till all have been printed. I was
trying to get this to work in a query with the IFF
statement,
IFF([start]=[finish],"",[start]+1)

An alternative approach is to use a small auxiliary table. Create a
table named NUM with one numeric field N, with values from 1 to the
maximum number of cards you'll ever need (be generous, it's cheap!)

Base your Report on your Query, but add the table Num to the query
*with no join line at all*. Instead, put a criterion on N of

<= [HowManyCards]

or whatever the parameter or field name is. This will give you that
many duplicates of the record, and you can include N as a control on
the report to display the card number.
 
Back
Top