No data in a Report Control

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

Guest

Hello,
I have a data entry form to enter data into two related tables. The form has
three subforms, two of which have controls with dependent dropdown lists
(combo boxes) that reference other controls in the form. I have successfully
set these controls to update as the user moves between records using requery
statements in the code modules of the control event properties. Now I have
made a Report from this form to display and print the data for each record.
Unfortunately, two of the dependent controls in one of the subforms (or is it
now a subreport) do not update as I move between records in the report. The
only records that display values are those that match the data in the record
that is currently active in the form, and only if the form is open.

I suspect that I need to include a requery statement for the appropriate
control event properties of the report. It seems that the OnPage event
property would be the best for my purpose. Any advice on the best code or
event property to use are appreciated. Alternatively, should I recreate the
report, pulling the data directly from the tables that the forms are used to
update?

Thanks in advance for any help. I am relatively new at Access development
and this is my first posting to this site so I apologize for any errors or
ambiguities in my posting. Advice in this regard is also appreciated.

Regards from Caimari
 
I don't quite understand what you mean by "dependent controls" or how you
have this set up. The appropriate event would not be the OnPage. Consider
using the On Format event which would occur for each iteration through the
detail section.
 
Duane, thank you for your response. By "dependent controls" I mean that I
have three dropdown lists (combo boxes). The first is in the parent form for
the "region" that a list of "observation points" and "areas" exist within.
The other two combo boxes for observation points and areas are in a subform.
"Depending" on which Region is selected in the parent form, the combo boxes
in the subform display the appropriate set of observation points and areas
for that Region in the subform.

I think that I have solved the problem with a simple and obvious solution.
In the report (made from the form using "save as: form"), which really only
needs to display the data, I have replaced the original subform with a copy
in which I remove the SQL statements that look to the "Region" Control to
evaluate the criteria for the dependent dropdown list. This works so far.

Again, thanks for your answer and I'll look into the On Format event to see
if it will be useful as well.

Cheers from Caimari
 
Back
Top