auto Serial Numbering for Each Quotation (1 Viewer)

rehanemis

Registered User.
Local time
Today, 20:11
Joined
Apr 7, 2014
Messages
195
Hi,

I am using an access program with a form with detail section. I would like to create auto sr.No when i am creating a new quotation. Using Autonumber didn't work because it start numbering from last quotation.

Snap shot is also attached.

Looking forward of your kind response.

Thanks
 

Attachments

  • AutoSerialNumbering.jpg
    AutoSerialNumbering.jpg
    96.2 KB · Views: 66

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 11:11
Joined
Jul 5, 2007
Messages
586
Based on your question, I'm a bit confused by your picture.

What I see are 4 rows of "Sr No" and 4 rows of "Qty" but I only see two rows of other information added.

It does appear that the "Sr No" field is unique, but are those unique to each line item for EVERY ORDER regardless of the customer to whom the quotation is targeted?

In theory, the field up at the top, "Quotation No:" would be your unique serial number based on each "new quotation" (using your terms).

In theory, the tracking the existing "Quotation No:" field and the "Sr No" field in your line items table should be the data you need.

Perhaps I'm missing something here but your question and original post leave a lot of room for differing interpretations.

Can you please provide more specific detail if necessary?
 

rehanemis

Registered User.
Local time
Today, 20:11
Joined
Apr 7, 2014
Messages
195
I have two sections on a form.


1- Main section that contains information that is unique regarding each quotation. Quotation no is key field for each quotation.

2- I have detail section where i would like to add item details the customer purchased. I would like to make "sr.no" field auto populate when quantity field is updated. For each quotation i would like that sr.no must start from 1 for example as type information in Qty field the Sr.no updated to 1 and when i update qty field of 2nd row the sr.no must be 2 and so on.

The sr.no bound to table and all records including sr.no must be saved in table.

Note: Please ignore the blank 2 blank rows of detail section.

My aim is to create auto sr.no starts from 1 upto how many rows i have to add and for each new quotation sr.no must start from 1.

Thanks
 

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 11:11
Joined
Jul 5, 2007
Messages
586
ok, well, I'm going to correct a little of your terms.

"Auto" implies that a field in a table is set to "auto Number" type.
In that circumstance, EVERY RECORD gets a sequentially higher auto number.

I would like to make "sr.no" field auto populate when quantity field is updated.
In your usage, I think what you'll need to do is write some code that determins the next highest sr.no number for THAT specific quote but NOT do it "on update". if you do it on update some action will take place even if the qty is just CHANGED instead of added new.
For example, your sales person sets a new (blank line) qty to 5 and the new (sequential) sr.no is generated for that line. If you have it set to triger "OnUpdate", if the sales person changes the qty from 5 to 7, yet another new sr.no number will be generated.

Some others may differe on this, I don't know, but for me, i have an invoicing system I've built where all the invoice line items 9for EVERY INVOICE) are in one seperate table. Each line item has its own unique ID (AutoNumber), but there is ALSO another field which denotes the exact line number for that record in the actual invoice for which that line is associated.
To be VERY CLEAR, this absolutely would not be needed if I did not want to have the line number visible on the acutal invoice.
If I were happy without a line number on the invoice, all I would need to do is sort the line item records for that invoice by ascending Autonumber and they would line up correctly.
 

Users who are viewing this thread

Top Bottom