Return a incremental group number per group in MS Access

前端 未结 2 1137
无人共我
无人共我 2021-01-25 08:24

I need help to create a query in Access to incrementally number groups of rows, grouped on a common date and keep the \"group numbers\" increment on the next date like showing i

2条回答
  •  忘掉有多难
    2021-01-25 09:20

    Here is one approach:
    SELECT A.*, (SELECT Count(*) FROM (SELECT DISTINCT [Date] FROM Table1) AS Q1 WHERE A.Date>=[Date]) AS GrpSeq FROM Table1 AS A;

    Another is with properties of textbox in Group Header on report:
    RunningSum: OverGroup
    ControlSource: =1

提交回复
热议问题