For Duane Hookom re Value from Next Record

  • Thread starter Thread starter Bob P
  • Start date Start date
B

Bob P

Please look at my response to your previous question of
Feb 10 9:02 PM. My original query was Feb 10 9:32 AM.
Thank you,

Bob P
 
I saw your replay but had to bite my tongue and delete my response because
it seemed quite selfish. I had asked some questions which you ignored and
went off in your own direction. I wasn't going to take the time to review
your code since I had lots of other things on my plate. I had some
suggestions but they depended on responses to the questions that I had
asked.

I also find it hard to spend the time to review and answer questions when
the poster doesn't take the time to change txt13 and txt15 to names that
would make understanding and maintenance much easier.

Sorry to be so rude but I couldn't convince myself to answer your question
in a civil way at the time. (My issue, not yours)
 
Sorry I did not directly reply to your request. In the
meantime I had an idea to procede and was frustrated that
it didn't work even when it looked like it was. Here are
the answers:
-table and field names:
the table is the query result driving the report (I have
left out the irrelavent fields)
Field Names and Sample Data:
lngNote lngSlide
1 1
1 2
1 3
1 4
2 1
2 2
3 1
3 2
3 3

-what I would like to eventually display:
Note that lngSlide starts counting from one every time
lngNote changes.
Every time lngNote changes I want the lngSlide value to
display with white letters on a black background in the
display before the change. I.e., in the sample data above
when lngNote is 1 and lngSlide is 4 the 4 would be printed
with white letters on a black background, then lngSlide =
2, 3, etc would print this way. I know how to handle the
color and background change. I just need to know to do it
at the right time.
..
Thus I need to look ahead to the next record to know what
to do in this record. If this is better done in the query
so be it.

I can see that your approach is much more efficient for
you and likely to get me a better answer. Thank you

Bob
 
You seem to need to identify when lngSlide is the maximum value from the
query for each lngNote. Create a new query
SELECT qselA.*,
[lngSlide]=(Select Max(lngSlide)
From qselA A
Where A.lngNote = qselA.lngNote) AS IsMax
FROM qselA;

Then, in your report, you can use conditional formatting where the IsMax
value = -1.
 
Back
Top