Increment start number values by group wise row depending on Quantity Of Leaves in Access (1 Viewer)

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:44
Joined
Sep 12, 2006
Messages
15,614
I think the thing is we don't really understand your data and your requirements.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:44
Joined
Feb 19, 2002
Messages
42,976
Your request is muddy at best. You really need to clarify the requirements. If you cannot state them in a way we can understand, we can't code for you . Here is a sample database that might help solidify your thoughts. It shows two samples. One with a complex "Number" and one with a simple sequence.
 

Attachments

  • CustomSequenceNumber20201020c.zip
    85.6 KB · Views: 80

kamrulbd

New member
Local time
Tomorrow, 03:44
Joined
Feb 10, 2021
Messages
11
I have made a little changes on CJ_London provided code.

SELECT tblCustomer.ID, tblCustomer.Name, tblCustomer.startno, tblCustomer.endno, tblCustomer.Noofleaves, Format([n]) AS Serial, [Name] & " " & Val([startno])+Val([Serial]) AS Datus
FROM t, tblCustomer
WHERE ((([t.n])<=[noofleaves]-1))
ORDER BY tblCustomer.ID, t.n;

Here "Noofleaves" qty depends on nth value of t table. Increment values from "startno" is working.

Many many thanks to all of you.
 

Users who are viewing this thread

Top Bottom