Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94

    Sequence No in order

    Hello guys,

    i need a help, how to create a Sequence # in report instead of Auto number........



    In Table i created ID as Auto number........ as well as in form also auto number will be formed according to our entry but in Report i want each line item should start with 1,2,3...... for eg: if see the image.......if i enter issue slip No it gives me list of record related to issue slip No, in Sq No column instead of 11,12,13.... i need Sq no as 1,2,3.......... Is that Possible............... can anyone help me please.............


    Click image for larger version. 

Name:	sq no.jpg 
Views:	17 
Size:	59.9 KB 
ID:	14577

  2. #2
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    Replace the TestTable with your Table/Query and add in the Fields you want to show instead of Num1, date1 etc

    Code:
    SELECT DCount("id","TestTable","id <= " & [id]) AS Counter, Num1, date1, TestTable.id
    FROM TestTable 
    ORDER BY TestTable.id;
    Last edited by AlexHedley; 11-30-2013 at 02:21 PM.

  3. #3
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    mr.alex

    where do i need to add...... whether in SQ No Control Source (in Expression builder) or where can u pls help me i'm just an beginner.........

  4. #4
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    If you create it as a new Query and the base your Report on this Query and drag the new Sequence Field on too.

  5. #5
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    ok right now this is the Query i'm using it in my Report. in this, IssueID is the Sqno....... so do i need to add this code in this query in expression build?..... or else can u provide a sample file for example.....pls..........

  6. #6
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    sry i forgot attach the image

    Click image for larger version. 

Name:	sq no 1.jpg 
Views:	15 
Size:	53.7 KB 
ID:	14578

  7. #7
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    You could create a new Query based on qryIssuedDetails.
    Add the following as a new Field then pull down the * to get the original Fields you had.

    Code:
    Seq: DCount("IssueID","qryIssuedDetails","IssueID <= " & [IssueID])

  8. #8
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    am i doing right...........

    Click image for larger version. 

Name:	sq no 2.jpg 
Views:	14 
Size:	99.6 KB 
ID:	14580

  9. #9
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    No. You don't need it as a Criteria.

    Add that in the Field Row (The first row) of the first column, then double click the * to make that the second column.

    You may need to look at your ID value too.

    Also the Code tags have caused an issue with the &amp; (you don't need "amp;")

  10. #10
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    now i'm right..........

    Click image for larger version. 

Name:	sq no 3.jpg 
Views:	14 
Size:	79.3 KB 
ID:	14581

  11. #11
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180
    DCount("IssueID","qryIssuedDetails","IssueID <= " & [IssueID])


    &lt; &amp; are issues with the way I posted it, sorry about that.
    &lt; should be <
    &amp; should be &
    Last edited by AlexHedley; 11-30-2013 at 02:19 PM. Reason: HTML character encoding

  12. #12
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    Click image for larger version. 

Name:	sq no 4.jpg 
Views:	12 
Size:	40.8 KB 
ID:	14584

    Click image for larger version. 

Name:	sq no 5.jpg 
Views:	12 
Size:	42.4 KB 
ID:	14585

    Click image for larger version. 

Name:	sq no 6.jpg 
Views:	12 
Size:	115.0 KB 
ID:	14586

  13. #13
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    I take it you don't need the empty rows?
    Is IssueID not your Key column?
    Why would they be empty? Were they test records?

    You could add a Criteria to qryIssuedDetails where IssueID IS NOT NULL.

  14. #14
    bronson_mech is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    94
    no i don't ve empty field....... once i run this query i get that 2 error msg and then it automatically create that empty field.......

  15. #15
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Sequence No in order

    Could you post a screenshot of the results from QryIssuedDetails?

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

Similar Threads

  1. Sequence of Query Calculation
    By Valhalla in forum Queries
    Replies: 2
    Last Post: 01-05-2013, 02:30 PM
  2. How to order columns in ascending order?
    By darkingthereturn in forum Access
    Replies: 5
    Last Post: 06-18-2012, 05:24 AM
  3. Sequence in Navigation Pan
    By AndreT in forum Access
    Replies: 1
    Last Post: 04-23-2012, 10:04 PM
  4. Enter new number in sequence in PO
    By tchirpich in forum Access
    Replies: 30
    Last Post: 12-30-2011, 11:24 AM
  5. Reverse Sequence of Numbers
    By OpsO in forum Queries
    Replies: 1
    Last Post: 08-12-2010, 06:05 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