D
DDBeards
Help Please, I have a form that contains a continuous subform. The subform
contains a list of products that support the main form. There is a boolean
on the subform to show the last order. Only one of the records on the
subform has this boolean set to true. What I am trying to do is when the
form opens, loop through the subform and find the record number of the one
record set to true. I have written code that loops through the records until
it finds the match then displays that record number on the main form. It
works great only if I build in some sort of trigger (a button or boolean)
that I manually set once the form is loaded and displayed. I have tried
putting the code in the on open of both the main and subform with no luck,
and I tried it in both on load and even on active. Nothing seems to work.
Can someone please give me some advise on how to loop through a record set
of a sub form when the main form opens so I can display a value elsewhere on
the main form.
Thanks
DDBeards
contains a list of products that support the main form. There is a boolean
on the subform to show the last order. Only one of the records on the
subform has this boolean set to true. What I am trying to do is when the
form opens, loop through the subform and find the record number of the one
record set to true. I have written code that loops through the records until
it finds the match then displays that record number on the main form. It
works great only if I build in some sort of trigger (a button or boolean)
that I manually set once the form is loaded and displayed. I have tried
putting the code in the on open of both the main and subform with no luck,
and I tried it in both on load and even on active. Nothing seems to work.
Can someone please give me some advise on how to loop through a record set
of a sub form when the main form opens so I can display a value elsewhere on
the main form.
Thanks
DDBeards