Updating a list control dynamically per group?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

This is driving me nuts. I've got a form, which is based on a query. Each
record is identified by an ID. I have grouped by ID, and have a header/footer
for each different iteration of ID. Pretty simple.

BUT. I want to dynamically access some other data using a list control,
based on the ID. As the ID changes for every iteration (obviously), I want
the data to reflect the ID of that Iteration. However, it would seam it
doesn't perform a requery for each iteration of the ID, rather just
performing the query for the first iteration, then using this for every
other. I think the problem has to do with requerying the data for each new ID.

How do I make the list control requery for each ID (rather than just once at
the start, meaning all the data is based on the first iteration, which is
incorrect)?
 
Liam M said:
This is driving me nuts. I've got a form, which is based on a query. Each
record is identified by an ID. I have grouped by ID, and have a header/footer
for each different iteration of ID. Pretty simple.

BUT. I want to dynamically access some other data using a list control,
based on the ID. As the ID changes for every iteration (obviously), I want
the data to reflect the ID of that Iteration. However, it would seam it
doesn't perform a requery for each iteration of the ID, rather just
performing the query for the first iteration, then using this for every
other. I think the problem has to do with requerying the data for each new ID.

How do I make the list control requery for each ID (rather than just once at
the start, meaning all the data is based on the first iteration, which is
incorrect)?


I think maybe you should use a subreport instead of a list
box. With a subreport, you can specify the Link
Master/Child Fields properties so the related records will
be displayed automatically.
 
well, you posted in the Reports newsgroup, but you mention a form. if you
are working on a report, see Marshall Barton's response elsewhere in this
thread. if you're actually using a form, suggest you requery the listbox in
the form's Current event procedure, as

Me!ListboxName.Requery

hth
 
Yeah, sorry, I meant report (sorry, I've just been working on the forms for
quite some time prior to this!).

Thanks, I'll try using a subreport instead, and post if i have an issues.
 
Back
Top