Form recalculates when printing. How do I enter formulas in Query?

  • Thread starter Thread starter Snoopy33
  • Start date Start date
S

Snoopy33

I have created a database that I use to attach to invoices prior to
giving them to accounting. It basically reports all information about
the invoice on a coversheet so that accounting doesn't have to research
the info theirself. There are quiet a few immediate if statements in
the report which seem to do ok by themselves, however I have a subform
that shows all parts used along with cost and billing prices. These
fields are totalled within the subform and those fields are reflected
on text boxes on the main form.

My problem is that when i print the form, it recalculates everything,
and in the middle of the recalculation, it prints. My form then prints
with inaccurate information on it. From what i've gathered, I need to
run a query with the formulas in it. I'm lost now. I don't know how
to get the formulas into the query to work properly.

Any suggestions would be appreciated.
 
I have created a database that I use to attach to invoices prior to
giving them to accounting. It basically reports all information about
the invoice on a coversheet so that accounting doesn't have to research
the info theirself. There are quiet a few immediate if statements in
the report which seem to do ok by themselves, however I have a subform
that shows all parts used along with cost and billing prices. These
fields are totalled within the subform and those fields are reflected
on text boxes on the main form.

My problem is that when i print the form, it recalculates everything,
and in the middle of the recalculation, it prints. My form then prints
with inaccurate information on it. From what i've gathered, I need to
run a query with the formulas in it. I'm lost now. I don't know how
to get the formulas into the query to work properly.

Any suggestions would be appreciated.

Forms are not ideal for printing: Reports are much better. Try opening
the form in design view, and use File... Save As to save it *as a
report*. You may need to change the Report's recordsource property to
a query referencing the form to get the InvoiceNo or other unique key.

John W. Vinson[MVP]
 
Excellent,

I was in the middle of recreating my form as a report. I had no idea
that you could just save it as a report. That saves me hours. THANK
YOU!! I also found where to enter the formulas within the query to
make the calculations for the totals and margins that i'm looking for.
Now I just have iron out some of the glitches and get a command button
that will select a single record to print from the report (there are
several posts on how to do that).

Thank you very much

Snoopy33
 
Snoopy33 said:
Excellent,

I was in the middle of recreating my form as a report. I had no idea
that you could just save it as a report. That saves me hours. THANK
YOU!! I also found where to enter the formulas within the query to
make the calculations for the totals and margins that i'm looking for.
Now I just have iron out some of the glitches and get a command button
that will select a single record to print from the report (there are
several posts on how to do that).

Thank you very much

Snoopy33

On a side note; I found that most of the lag came from using IIF
functions to enter a "0" in null value fields. A suggestion in a
different post said to use the Nz function to overcome this. I removed
all of the IIF statements that were put in to accomplish this and used
the Nz function instead. Now my form prints perfect whether i use the
report to print from or print directly from the form itself.

Much appreciation for everyone who helps all the newbies like me.

Snoopy33
 

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