Form Printing Error

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

Guest

Access 2003

I have a simple list (continuous) form. On this form, I have a combo box.
It is a bound field. The row source for the box is a query containing 3
fields. The first field of the query is bound. When I display the form,
everything displays correctly. If I filter the form excluding an entry
(using the right-click pop up menu), the list is filtered correctly. When I
print the filtered list, all values for the filtered field display the value
of the first filtered row. If I print preview the filtered list before
printing it, the list prints correctly. Any help in correcting this problem
would be appreciated.
 
Create a report, and print that instead of the form.

In report design view, use the Sorting and Grouping dialog to define the
sort order.

To print the report using the same filter applied to the form, use this kind
of thing:
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False
If Me.FilterOn Then strWhere = Me.Filter
DoCmd.OpenReport "Report1", acViewPreview, , strWhere
 
Unfortunately, this doesnt solve the problem. Our users, quite often want to
print their form as a quick reference and creating a report for each screen
would be quite burdensome. Am I doing something inherently wrong or is this
a known bug with Access 2003? If this is a bug, does it exist in other
versions?
 
There is not a single answer to your question.

Why do you expect the records to be ordered? Have you specified a sort order
for your main form and subform? If you are relying on a table, and then
apply a filter, you have effectively applied a query that has no sorting.
You can rectify the situation by also applying a sort order, either by
right-clicking and sorting, programmatically assigning the Order and OrderOn
properties, or using an Advanced Filter.

It is not a bug. Printing forms will not give your users reliable results.
 
Firstly, I would like to say thank you for trying to help me figure out this
problem.

I'm not totally sure that I've defined the sitution correctly. It's not a
sorting issue. Let me start over. On a simple continiuous form, I have a
combo box. The combo based is a query that essetianlly links a value to a
key in a lookup table. I use the combo box instead of the lookup value in
order to allow my users to edit the form. After using the right click
exclude filter option, information is displayed correctly on the screen; but
it is not displayed correctly when the screen is printed (file, print). On
the printed copy, all values for the filtered field display the value of the
first row instead of the value displayed on the screen for the row. If use
the print preview feature and print from there, this error does not occur.
I've duplicated this problem with tables linked to SQL server and native
access tables. Hopefully this gives you a better idea of what I'm trying to
do.
 
So this is a bound combo, with 3 columns, and the bound column is not
visible when the combo is not dropped down.

And if you print the continuous form, instead of showing the appropriate
value on each row, it repeats the value of the form's current record on all
rows. Unless you Print Preview first.

While I have not seen that behavior (I never print forms), it's easy enough
to see how it could get that situation wrong. So, yes: it probably is a bug.

Like I said, you will not get reliable output if you print a form. Providing
a report will give you reliable results. Printing a form will not.
 

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

Back
Top