What is "ai_StudentID"?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> This is the first line of a function that I execute repeatedly throughout
> my
[quoted text clipped - 9 lines]
> ls_firstname = DLookup("First_Name", "tblStudents", "[student_id] = " &
> ai_StudentID)
Laurel - 29 Jul 2006 15:56 GMT
That was it. The function was being called by the report. I had this in
one of the header text items: =fncStudentName([student_id]).
The second time I ran the report I was adding the current day, and so there
were no records for the report. I'll add a check.
The truly weird thing, though, was that even when I hovered over ai_student
with the mouse in the debugger, I would get that "no current record" error.
You'd think the function would just treat it as a null. How did it know why
the value wasn't good???
Thanks for helping me see the obvious.
> What is "ai_StudentID"?
>
[quoted text clipped - 12 lines]
>> &
>> ai_StudentID)