S
studlength
Hello. Access 2003
I'm in the testing phase of a new database with tables Customers,
Orders, and Payments. There is a one-to-many relationship from
Customers to Orders and a one-to-many relationship from Customers to
Payments. I created a report that shows each order and each payment
that a customer has made, as well as a running balance. The report is
based on a union query. I have a command button on a form
(frmCreateReports) that creates the report based on the customer
selected from a dropdown menu. It all works great, EXCEPT........
Occasionally, the report misses complete orders that should be
included. I can preview the report time and time again with no
problem, but every now and then the report leaves out orders (even
though I have not changed any data). I've tried to figure out what may
be causing this by retracing my steps but I've had no luck. The last
time it happened I noticed that the order that was left out was the
very first order ever entered (Order number 1). When it happened I
closed the report and tried creating it again. The mistake was still
there. So I closed the report and closed frmCreateReports, reopened
frmCreateReports, clicked on the command button and the report opened
correctly.
I am assuming that the problem is not with the report but rather the
query. Anybody know why a union query would produce inconsistent
results like this? Keep in mind, I'm not changing any of the data, I'm
just goofing around opening different forms, reports, etc and suddenly
the report opens incorrectly. I will keep trying to figure out a
pattern. If I learn anything new, I will repost.
Thanks.
I'm in the testing phase of a new database with tables Customers,
Orders, and Payments. There is a one-to-many relationship from
Customers to Orders and a one-to-many relationship from Customers to
Payments. I created a report that shows each order and each payment
that a customer has made, as well as a running balance. The report is
based on a union query. I have a command button on a form
(frmCreateReports) that creates the report based on the customer
selected from a dropdown menu. It all works great, EXCEPT........
Occasionally, the report misses complete orders that should be
included. I can preview the report time and time again with no
problem, but every now and then the report leaves out orders (even
though I have not changed any data). I've tried to figure out what may
be causing this by retracing my steps but I've had no luck. The last
time it happened I noticed that the order that was left out was the
very first order ever entered (Order number 1). When it happened I
closed the report and tried creating it again. The mistake was still
there. So I closed the report and closed frmCreateReports, reopened
frmCreateReports, clicked on the command button and the report opened
correctly.
I am assuming that the problem is not with the report but rather the
query. Anybody know why a union query would produce inconsistent
results like this? Keep in mind, I'm not changing any of the data, I'm
just goofing around opening different forms, reports, etc and suddenly
the report opens incorrectly. I will keep trying to figure out a
pattern. If I learn anything new, I will repost.
Thanks.