Hey Guys,
I have a form that contains a subform. Let's use the example of a video store;
We have a record for each person who hires videos containing personal details, and a subform containing all the videos they have hired and whether or not they've been returned.
That all works great!
How do I get the master form to display a label if ANY of the hired videos are overdue?
So we have:
Video 1 - Returned
Video 2 - On Loan
Video 3 - On Loan
Video 4 - Overdue - $5
Can I somehow push the entires into an array each time they are loaded up? So when i go to the next record, the array is filled with new values, keeping in mind that someone may only have 1 video, while others could have hundreds!!!
I have a really bad "for" loop example that *might* help clear up what i'm trying to achieve.
For $i in VideoReturnStatus[] (
if [ReturnStatus] = "Overdue" then
[SomeLabel] = "OVERDUE"
else if VideoReturnStatus[] = "On Loan" then
[SomeLabel] = "On Loan"
else
[SomeLabel] = ""
end if
)
Does that make sense? So if any of the videos are overdue it displays OVERDUE, if any of them are on loan, and none are overdue it displays On Loan, and if their videos are all returned, display nothing.
I have had bugger all success trying to talk to the subform data so far. I'd also like to be able to have a summary total of how much they owe in overdue video fines.
Can someone help me out with this?
I'm not scared of using VBA - just unsure what to use so far.
Thanks for reading the above! I hope you can help.

I have a form that contains a subform. Let's use the example of a video store;
We have a record for each person who hires videos containing personal details, and a subform containing all the videos they have hired and whether or not they've been returned.
That all works great!
How do I get the master form to display a label if ANY of the hired videos are overdue?
So we have:
Video 1 - Returned
Video 2 - On Loan
Video 3 - On Loan
Video 4 - Overdue - $5
Can I somehow push the entires into an array each time they are loaded up? So when i go to the next record, the array is filled with new values, keeping in mind that someone may only have 1 video, while others could have hundreds!!!
I have a really bad "for" loop example that *might* help clear up what i'm trying to achieve.
For $i in VideoReturnStatus[] (
if [ReturnStatus] = "Overdue" then
[SomeLabel] = "OVERDUE"
else if VideoReturnStatus[] = "On Loan" then
[SomeLabel] = "On Loan"
else
[SomeLabel] = ""
end if
)
Does that make sense? So if any of the videos are overdue it displays OVERDUE, if any of them are on loan, and none are overdue it displays On Loan, and if their videos are all returned, display nothing.
I have had bugger all success trying to talk to the subform data so far. I'd also like to be able to have a summary total of how much they owe in overdue video fines.
Can someone help me out with this?
I'm not scared of using VBA - just unsure what to use so far.
Thanks for reading the above! I hope you can help.