Results 1 to 9 of 9
  1. #1
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160

    How to Get Serial Numbers In Sub Form

    Hi Guys,

    I am am Working on a billing database. I have a main form frmBill & sub-form frmBillDetails. Everything is working fine.

    What I want is to add serial numbers to the subform, if detail is added in product portion. The serial number is only for the display purpose not for data storig purpose. Similarly while printing also need to add the serial numbers to the bill printed format, again only for the display purpose.

    I am sure in forum somewhere this question must have been answered but Unable to find the thread. If you could guide me to the same, that would also help alot. If not, please help me how to achieve the required serial numbers.



    Awaiting your Guidance and help.
    Thanks and Regards
    Deepak Gupta

  2. #2
    Join Date
    Apr 2017
    Posts
    1,673
    Quote Originally Posted by deepakg27 View Post
    The serial number is only for the display purpose not for data storig purpose. Similarly while printing also need to add the serial numbers to the bill printed format, again only for the display purpose
    And when the customer returns later with complaint, and you have nowhere saved the info exactly this product was either bought from you, or has valid warranty at moment?

    You need to enter the serial number anyway (to get it into bill), so why not to have a field in BillDetails table for it?

  3. #3
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Hi ArviLaanemets,

    I think was unable to explain my self clearly. Sorry for that. The Bill# is being saved and also all the products entered are being save with unique Bill Details Id, which is linked to Bill# in main table. The serial numbers are just being used for display purposes on the bill, basically like a Line Number and that also if some product is being entered in that particular line. For example:

    Serial Number Product Qty Rate Amount
    1. Cap 1 1 1
    2. Hat 2 2 4
    3. Jacket 3 3 9

    Like this it goes on and on. Need serial number to appear only if something is entered in Product Field.

    Hope I have been Able to Explain.

    Regards
    Deepak Gupta

  4. #4
    Join Date
    Apr 2017
    Posts
    1,673
    Then I think you are using the termin "serial number" incorrectly!

    The serial number is unique identifier of certain exemplar of certain product. You can't sell several products with same serial number! Even more - there must not be 2 different exemplars of same product with same serial number in whole world. Usually the producer doesn't use same serial numbers for his different products too. So having a product in your bill with serial number identified means, that it's quantity is 1 by default!

  5. #5
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Fine, I agree Serial Number as a term could be confusing. All I Need is a row number on the bill, starting from 1 for each bill.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If you only need this sequence number for display, do it in report. Textbox has RunningSum property that can be used to calculate this number. Doing this sort of calc in query or form is really, really difficult.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    thanks that was what was needed.

    regards

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    in a report there is a rownumber feature you can use called running sum - see this link

    http://allenbrowne.com/casu-10.html

    Link also shows what to do for forms

    however I note you do not want a line number if something is missing - your description is vague, does this 'if detail is added in product portion' mean there is a record, or does it mean 'Need serial number to appear only if something is entered in Product Field.', per your next post. and then you say 'All I Need is a row number on the bill, starting from 1 for each bill'. Each of these have a different solution. The above link addresses the last one.

  9. #9
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Dear Ajax,

    Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Inserting serial numbers form 1 to 20 in each report page
    By sureshchittilamchery in forum Access
    Replies: 2
    Last Post: 03-16-2017, 08:13 PM
  2. Autopopulating Serial Numbers
    By nkoenig34 in forum Programming
    Replies: 3
    Last Post: 01-19-2016, 11:07 AM
  3. Help with Serial numbers table
    By RandyP in forum Programming
    Replies: 2
    Last Post: 06-11-2014, 03:39 PM
  4. mutli serial numbers in one
    By wirelineuk in forum Queries
    Replies: 1
    Last Post: 10-11-2012, 01:26 PM
  5. Automatic Serial Numbers
    By Mitch87 in forum Access
    Replies: 9
    Last Post: 02-18-2010, 12:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums