I have a query that is used to collect a recordset from a table for printing receipts. The receipt number needs to match a pre printed form from the government. The receipt numbers are sequential
I need a query to populate the receiptnumber field sequencially starting ayt a number specified in a form. The form has a text box called txtStartingReceptNumber.
So if the number 5073 is in that text box I need the query to put that in to the ReceiptNumber field in the first record of the record set and then increase it by one for all of the remaining records. I have search and found a few solutions but none see to work for me
I have tried
in the update to parameter of the ReceiptNumber field. That put 5074 in every record. Close but no cigar. I know I have to replace the 5073 with the fully qualified name of the text box. This was just to try and get a working model.
Any help would be greatly appreciated.
I need a query to populate the receiptnumber field sequencially starting ayt a number specified in a form. The form has a text box called txtStartingReceptNumber.
So if the number 5073 is in that text box I need the query to put that in to the ReceiptNumber field in the first record of the record set and then increase it by one for all of the remaining records. I have search and found a few solutions but none see to work for me
I have tried
Code:
Nz(DMax("[ReceiptNumber]","tbl_Activity"),5073)+1
in the update to parameter of the ReceiptNumber field. That put 5074 in every record. Close but no cigar. I know I have to replace the 5073 with the fully qualified name of the text box. This was just to try and get a working model.
Any help would be greatly appreciated.
Last edited: