Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,941
    but it appears that these are on a form
    so you didn't look at the underlying queries then?



    You do realise that by providing incomplete information, wrong answers to clarification questions and simplistic sample data, you are wasting everyone's time, including your own.

    Suggest since this is to be exported to excel and you have an excel solution for your requirement you stick with that. Google 'excel automation from access' if you don't know how to do this from Access, or just do it manually

  2. #17
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    I wouldn't use domain functions in queries, they are deadly for performance. But something like rownumber() over (partion by [grouping field] order by [ordering field]). Only, I don't know the Access syntax for this.

  3. #18
    Join Date
    Jun 2022
    Posts
    28
    =IF(B2=B1,A1+1,1)
    This will only count sequential instances of a value. If the value is repeated again a few lines later the count starts over at 1.
    That makes it highly dependent on the order the records are displayed.

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Quote Originally Posted by seņor_sriracha View Post
    This will only count sequential instances of a value. If the value is repeated again a few lines later the count starts over at 1.
    That makes it highly dependent on the order the records are displayed.
    That is what we are trying to get over to the O/P.
    CJ_London has supplied a link to a DB that has a function to do what the O/P wants, but it still has to be in a certain order for even that to work.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    chudok01 is offline Novice
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    7
    Quote Originally Posted by seņor_sriracha View Post
    This will only count sequential instances of a value. If the value is repeated again a few lines later the count starts over at 1.
    That makes it highly dependent on the order the records are displayed.

    I am ok with that. The data is already sorted in the way I need it sorted for this numbering I need.

  6. #21
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    To have it in a query without using a form:

    Click image for larger version. 

Name:	WindowPerProduct.jpg 
Views:	9 
Size:	118.7 KB 
ID:	51928

    Only I don't know how to convert to pure Access SQL.

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

Similar Threads

  1. Form Based on SKU Category
    By HansBades in forum Access
    Replies: 4
    Last Post: 08-22-2022, 11:07 PM
  2. Replies: 8
    Last Post: 10-07-2018, 05:24 PM
  3. Replies: 1
    Last Post: 01-22-2016, 04:36 AM
  4. Replies: 27
    Last Post: 12-02-2015, 06:09 PM
  5. Replies: 5
    Last Post: 05-10-2014, 09:24 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