Checkboxes

D

Dar

I copies a form which has checkboxes on and pasted into report.
When user checks the form I need to have the checkbox that has been checked
carry over to the
report. It doesn't seem to work.

Solution :
 
K

Ken Sheridan

If it’s a bound form then the report will also need to be bound and the
checkbox controls in the report will need to be bound to the same fields as
those on the form. Also the form's current record will need to be saved
before opening the report to ensure that any values entered in the form but
not yet saved to the underlying table are reflected in the report. If you
are doing this from code in the form's module it would be something like this:

' save current record
Me.Dirty = False
' open the report
DoCmd.OpenReport "MyReport", View:=acViewPreview

If the form is unbound, or if it’s a bound form and the checkbox controls on
it are unbound, then you'd need to reference the form's controls as the
ControlSource properties of the corresponding checkbox controls in the
report, e.g.

=[Forms]![MyForm]![MyCheckBox]

The form would have to be open when the report is opened of course.

Ken Sheridan
Stafford, England
 

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