Going crazy! HELP!
I am ready to pull my hair out over this. I can't seem to figure out how to isolate a specific record on a report, a form or anyother way. I know that I need to pass a value, but I'm not sure how to incorperate that value for each individual record. I have both the inside out manual for 2007 as well as the Access 2007 VBA Programmers manual here and I can't find what I am looking for. Here is what I am trying to do.
I have a report that lists all tools that will be due for calibration within 7 calendar days. The datediff fuction works just fine. On the report I installed a hidden label that is supposed to appear when a tool is overdue, (when txt_days_remain < 1). What seems to be happening is that when it triggers it triggers for all and visa versa. Somewhere in the back of my mind I am thinking that if I can isolate the conditions for the over due label I can make this thing work. I occurs to me that all I need to do is to tell it the code,
"for each unique record" (txt_inst_id) [also the primary key] if txt_days_remain < 1 then lbl_over_due.Visible = True.
I can't seem to figure out the language needed to make this happen. For that matter I can't seem to figure out how to get the value of the txt_inst_id for any other purpose, such as opening the record in a pop up form for editing. This simple functionality is critical to what I am trying to do. Can someone please help me figure this out? I am not one to give up without a fight and will do the leg work if someone can at least point me in the general direction.
|