report showing data it shouldnt (1 Viewer)

murray83

Games Collector
Local time
Today, 11:38
Joined
Mar 31, 2017
Messages
728
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
    1.6 MB · Views: 82
  • click this first.jpg
    click this first.jpg
    10.3 KB · Views: 72
  • input TL3.jpg
    input TL3.jpg
    84.6 KB · Views: 69
  • input date.jpg
    input date.jpg
    15.3 KB · Views: 68
  • attached in email.jpg
    attached in email.jpg
    60.2 KB · Views: 65

murray83

Games Collector
Local time
Today, 11:38
Joined
Mar 31, 2017
Messages
728
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: 69

JHB

Have been here a while
Local time
Today, 12:38
Joined
Jun 17, 2012
Messages
7,732
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]));
 

kevlray

Registered User.
Local time
Today, 03:38
Joined
Apr 5, 2010
Messages
1,046
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.
 

murray83

Games Collector
Local time
Today, 11:38
Joined
Mar 31, 2017
Messages
728
an extra set of eyes

many thanks changed that one thing and bam it worked

cheers
 

Users who are viewing this thread

Top Bottom