report showing data it shouldnt

murray83

Games Collector
Local time
Today, 20:40
Joined
Mar 31, 2017
Messages
845
i have a report which is showing some data correct and then some which it has no need to show based on user input

see attached database and pictures

but simple fact is the user inputs a fault code in this example its 'TL3' then date which is 10/06/19 report runs attaches to email ( may not on ur own pc's )

but then report is showing TL4 can someone much smarter then me tell me why
 

Attachments

  • example.accdb
    example.accdb
    1.6 MB · Views: 135
  • click this first.jpg
    click this first.jpg
    10.3 KB · Views: 114
  • input TL3.jpg
    input TL3.jpg
    84.6 KB · Views: 112
  • input date.jpg
    input date.jpg
    15.3 KB · Views: 115
  • attached in email.jpg
    attached in email.jpg
    60.2 KB · Views: 111
sorry for quick dp but wasn't aware 5 attachments is the max here is the last picture
 

Attachments

  • pdf but why showing TL4.jpg
    pdf but why showing TL4.jpg
    74.1 KB · Views: 114
Do you have a field called "ComplianceCode" in the table "tblEmailAddress"?
I ask because I can't find it and you use it in the below Where clause.
WHERE (((tblChargingTable.ComplianceCode) In (SELECT [ComplianceCode] FROM [tblEmailAddress] )) AND ((tblChargingTable.AppointmentDate)=[For Which Date]));
 
It does not appear that the ComplianceCode is part of the tblEmailAddress table, but there is a SupplierCode. It appears that if you replace the column name (ComplieanceCode with SupplierCode) then the query will work correctly.
 
an extra set of eyes

many thanks changed that one thing and bam it worked

cheers
 

Users who are viewing this thread

Back
Top Bottom