Reports printing wrong data

M

Mike

Hello to all, just having an issue with a report. Basically I have created a
form that has a command button that calls for a make table query first then
pulls the data from the new table into the report. One field within the
report is coming up incorrect. This is what the card should look like:

FemaleLastName, FemaleFirstName
MaleLastName, MaleFirstName
CaseIDNumber

But when running the report only the "Male" infomation is partially
incorrect. It will show the "Female" information along with the
MaleFirstName and I'm not sure why. I've tried playing around with it,
recreating it, looking at the query and I'm out of ideas. Anyone have the
know how as to why this is happening? If so, how could I go about correcting
this?

Mike
 
K

Klatuu

It would likely not be the report that has the issue, but the make table query.
In reality, you probably don't need to use a make table query. In fact,
make table queries should be avoided. They are a big contributer to database
bloat. If you can write a query that creates a table, a version of that
query could be used as the report's record source.

If, for some reason, it would be too complex to create a select query to use
instead of the make table, I would recommend you use a static table. It will
not contribute to bloat like a make table query will. Use, instead, an
append query to load the data into the static table. All you have to do is
to run a delete query on the table to remove the previous data before you run
the append query.

But, without seeing the code or SQL for the make table query, it would be
impossible to help debug it.
 
M

Mike

Thank you for responding to my issue. You're making much sense and I'm a
little unsure on how to successfully acheive what you had suggested. In
hopes that you can understand what I'm dealing with, I've pasted the SQL
Specific code below:

SELECT Cases_Tbl.ProtocolNumber, Cases_Tbl.DateEntered,
Cases_Tbl.GrantedDate, Cases_Tbl.GrantorTitle, Cases_Tbl.GrantorFname,
Cases_Tbl.GrantorLname, Couple_Tbl.PetitionerFname, Couple_Tbl.PetitionerMI,
Couple_Tbl.PetitionerLname, Couple_Tbl.RespFname, Couple_Tbl.RespMI,
Couple_Tbl.RespLname INTO CardsTbl
FROM Cases_Tbl INNER JOIN Couple_Tbl ON Cases_Tbl.CaseIndex =
Couple_Tbl.CoupleIndex
WHERE (((Cases_Tbl.DateEntered) Between [Please enter your starting date]
And [Enter you ending date]));

If there's something that I'm leaving out, please feel free to ask. I'm not
really sure why the query is ruining the report. It seems fine when I run it.

Mike
 
M

Mike

Hey Dave! Ok I tried what you had suggested and was able to create a append
query and delete query. I now have the command button running both queries
so the table is constantly updated however I'm still receiving the same
output. Not really sure at this point where to turn to. Hope you have some
good news, if not I thank you for your efforts.

Michael
 
K

Klatuu

I don't see anything in the query that looks suspicious. It is just a select
query. I still don't understand why you have to put data in a table to do
this report. It doesn't look that complicated.

But, Not knowing which fields in your table are bound to which controls on
you report, I don't have a clue. Follow the trail of data backwards. Start
by looking at the control that is giving the wrong value on the report and
see what field it is bound to in the reports's recordset. Then see which
field in the query creates the value in that field, then follow that to the
source table to be sure you are picking up the correct fields. There has to
be a disconnect there somewhere.
 

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