Populate report list box

R

RD

Hi all,

I'm bending my brain over this one.

I have a data entry form with a button that opens a report. On the report is a
list box that contains the "children" of the "parent" for the report. The
report is based on a query that joins the child and parent tables. I need to
restrict the values shown in the list box to only those that match the parent
record. Right now the report shows the correct parent record but the list box
shows all the child records. I've known about the OpenArgs property for reports
for a while now but have never actually needed to use it. Would that be
appropriate in this case? Could anyone show me how to go about that?

Is there another way to go about doing this?

In a somewhat related issue: why doesn't RowSource show up in the VBE for my
list box? It shows up in the propery box.

Thanks for any help,
RD
 
M

Marshall Barton

RD said:
I have a data entry form with a button that opens a report. On the report is a
list box that contains the "children" of the "parent" for the report. The
report is based on a query that joins the child and parent tables. I need to
restrict the values shown in the list box to only those that match the parent
record. Right now the report shows the correct parent record but the list box
shows all the child records. I've known about the OpenArgs property for reports
for a while now but have never actually needed to use it. Would that be
appropriate in this case? Could anyone show me how to go about that?

Is there another way to go about doing this?


I think that a list box in definitely an inapporpriate
mechanism for this kind of thing. A subreport would be far
better.

On the other hand, you may not need any of that stuff.
Instead, try creating a group level with head section (View-
Sorting and Grouping menu) for the parent data and use the
detail section for the child data.
 
R

RD

I think that a list box in definitely an inapporpriate
mechanism for this kind of thing. A subreport would be far
better.

On the other hand, you may not need any of that stuff.
Instead, try creating a group level with head section (View-
Sorting and Grouping menu) for the parent data and use the
detail section for the child data.

Yeah, I guess I was trying to make it more complicated than it really needed to
be. I'm trying to duplicate, or at least emulate, a gov't. form. The first
time I tried grouping it trashed the layout and you know how the gov't can be
about their forms. With a little tweaking I got it to look pretty close to
their hard copy. I'll thnk they'll accept it.

Thanks for setting me straight,
RD
 
M

Marshall Barton

RD said:
Yeah, I guess I was trying to make it more complicated than it really needed to
be. I'm trying to duplicate, or at least emulate, a gov't. form. The first
time I tried grouping it trashed the layout and you know how the gov't can be
about their forms. With a little tweaking I got it to look pretty close to
their hard copy. I'll thnk they'll accept it.

Thanks for setting me straight,


Government forms can be nasty. Getting close can be quite
an accomplishment and I hope it holds up when the
bureaucratic robots apply their insidious rules and
regulations to it ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top