I have a Form with fields StudentID, StartDate, TxDate (Treatment Date) among c.60 other fields. There is a Go To Student drop-down box in the Form's Header that establishes a subset for the StudentID selected records only when a particular StudentID is selected from the drop-down.
There are buttons to click to First, Previous, Next, Last
I want to show on the Form, as you click First, Previous, Next, or Last, and go to the Next record, the number record for that individual StudentID. That is, if the Student had 6 records, it would display 1 of 6 for their first record, 2 of 6 for the Next, 3 of 6 for the Next....
I've tried things like DCount('RecordNo","Depression Form Query","Student") which counts all the records in the Data Table, not just the individual StudentID's.
I used an Autonumber in the Students Table but it generates a number equivalent to the StudentID being the 3rd Student entered, not a count of their Treatment Dates.
I've tried various loopings I've found on the net but they do not count across records for the same Student.
I made an X of Y Report which I then dragged and dropped into the Form. It generates the correct Y (6) but an incorrect X.
[]
The Depression Form Query is based on the Students Table and the Depression Table.