Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increment on change?

Status
Not open for further replies.

valkyry

Technical User
Jan 14, 2002
165
US
I have a query where it pulls the last ReceiptNumber from ReceiptHistory.

I was hoping someone can help me on how I can have the last ReceiptNumber increase by 1 on change of the PO Number.

Example: the last ReceiptNumber say is 12345
So in my query it says:
ReceiptNo: DMax("ReceiptNo","qryLastReceiptNumber") with PONumber and other data fields.

I need the query to show the ReceiptNo to be 12346 and so on each instance of a change in the PONumber.

hope that made sense?
 
Here's the query result:
PONumber ReceiptNo
1001967 100191
1002005 100191

Need it to be:
PONumber ReceiptNo
1001967 100192
1002005 100193
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top