Firing code from an embedded form on a report?

M

MarkWill

I've got an Access 2000 form with some simple VBA code on it to hide
(visible=false) some fields based on data content. Works great when editing
the form. I've embedded that Form into a Report, so I can get a nice
print-out with more layout control, but when I print the report, the code on
the embedded form to hide certain fields does not seem to fire. I've tried
putting the code on the form's OnCurrent, OnLoaded, OnOpen - every event I
can think of, but I just can't get it to hide those fields when the form gets
printed via a report. Any clue of a workaround?
 
M

Marshall Barton

MarkWill said:
I've got an Access 2000 form with some simple VBA code on it to hide
(visible=false) some fields based on data content. Works great when editing
the form. I've embedded that Form into a Report, so I can get a nice
print-out with more layout control, but when I print the report, the code on
the embedded form to hide certain fields does not seem to fire. I've tried
putting the code on the form's OnCurrent, OnLoaded, OnOpen - every event I
can think of, but I just can't get it to hide those fields when the form gets
printed via a report. Any clue of a workaround?


Forms are not an appropriate object to place on a report.
Create another report that mimics your form and use it as a
subreport.
 
Top