printing problem

G

Guest

I need some help. I had a recent question about using a checkbox to disable
a field until the checkbox is selected. The final solution that worked for
that question ended up looking like this:

Private Sub Form_Load()

Me![Grievance Num].Enabled = False

End Sub


And the after update property on the Grieved checkbox:


Private Sub Grieved_AfterUpdate()

Me![Grievance Num].Enabled = Me![Grieved]

End Sub


There is a flaw in this solution. Printing the form no longer shows any of
the fields on the form unless the checkbox is selected. Can I add some code
to the form_load event that will allow the fields to show up when I print
when the checkbox is not selected?

Help...
 
G

Guest

Hi Todd,

Usually one does not print a form. If you do, you always have to remember to
select current record only, or else you'll get the entire recordset. Also,
printing forms consumes more ink, if the background is anything but white.

Instead, create a report that is suitable for printing your single record.
Use the primary key value to identify the record in the WhereCondition
argument of the OpenReport method. You should have a textbox on the form that
displays the record's primary key (PK) value, although you can set the
visible property for this textbox to No (useful for autonumber PK). Here are
step-by-step instructions for accomplishing this task:

How to print only one page of a multipage report
http://www.access.qbuilt.com/html/reports.html#PrintOnePgOfRpt


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

I need some help. I had a recent question about using a checkbox to disable
a field until the checkbox is selected. The final solution that worked for
that question ended up looking like this:

Private Sub Form_Load()

Me![Grievance Num].Enabled = False

End Sub


And the after update property on the Grieved checkbox:


Private Sub Grieved_AfterUpdate()

Me![Grievance Num].Enabled = Me![Grieved]

End Sub


There is a flaw in this solution. Printing the form no longer shows any of
the fields on the form unless the checkbox is selected. Can I add some code
to the form_load event that will allow the fields to show up when I print
when the checkbox is not selected?

Help...
 
G

Guest

Tom,

I really do need to print the individual form in quite a few cases. The
ink/toner used really is not an issue. I have created several reports, but
there are instances where the data that is needed is just the form data,
which is why I added the print button to the form.
 
G

Guest

Todd,

The solution I provided should allow you to print just the form data, for
the active record. Give it a try before deciding that it won't work for you.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

Tom,

I really do need to print the individual form in quite a few cases. The
ink/toner used really is not an issue. I have created several reports, but
there are instances where the data that is needed is just the form data,
which is why I added the print button to the form.
 

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

Similar Threads


Top