Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Anil Bagga is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Apr 2020
    Posts
    69
    Thanks June7. Yes no sense making life so complicated in trying to have serial nos. in Sub forms. However it would help if a simple way, like in a report, is available in forms too!

  2. #17
    Anil Bagga is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Apr 2020
    Posts
    69
    Bob. I tried that in the Sub Form. Like June7 said, it yields 1 in all records. Can you test this is a sub form situation?

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,893
    Row numbering is not facilitated in forms because forms are often filtered/sorted by user.
    Last edited by June7; 05-26-2020 at 07:02 PM.
    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.

  4. #19
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Anil Bagga View Post
    Somehow the couple of videos I saw on creation suggested to add the Sub form in the Footer of the main form. I am using it as suggested in the Detail of them Master form.

    Serial Number of Sub Form

    Assume there are 8 items in the Subform. I want a column to indicate the Serial number say 1 to 8.

    Q1 - how does one go about it? Do we add a text field in the Subform? How does it auto-generated? The Serial No should be reset to start from 1 for each header record (which in my case is the Sales Order!)
    Q2 - If I delete a record in the sub Form, the Serial no should reset. So if I delete serial no 4 of sub form, Sr 5 to 8 will be renumbered as 4 to 7
    AutoNumber
    ----------------
    Purpose: Use an AutoNumber field to provide a unique value that serves no other purpose than to make each record unique. The most common use for an AutoNumber field is as a primary key.


    Autonumbers--What they are NOT and What They Are

    Microsoft Access Tables: Primary Key Tips and Techniques

    Relational Database Primary Keys

    Use Autonumbers properly


    Every table I create has an Autonumber type field.
    If you have a (Serial Number) number that must be consecutive, you will have to write your own code to manipulate the number.

    So the answer to Q2 is you'll have to write code to keep the numbers consecutive.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 11-21-2019, 03:30 AM
  2. Replies: 3
    Last Post: 05-02-2018, 11:37 AM
  3. Replies: 3
    Last Post: 06-29-2017, 03:02 PM
  4. Replies: 1
    Last Post: 03-21-2016, 10:40 AM
  5. Replies: 2
    Last Post: 01-06-2011, 04:38 AM

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