Yes/No on report

lite4d

Registered User.
Local time
Today, 11:18
Joined
Apr 2, 2014
Messages
27
I'm building a report and I need to validate if 1 field on a table is listed in another table. I've tried almost everything and can't get anything to work. I built the unmatched query to separate the data but still cant seem to get it to work. All help is appreciated.

Table: DEMAND Field: MATERIAL
Table: PREX Field: NIIN

I need to know if Material matches NIIN then show a "Y" if not then show "N" on text box on report


Chris
 
Last edited:
Presuming both fields are in the query:

IIf(Material = NIIN, "Y", "N")
 
Demand and PREX are both tables. If PREX.NIIN=DEMAND.MATERIAL, "Y" if not "N"

I have tried putting them in the same query but it just shows all yes.

I've tried ISNULL and IF statement but can't get those to work either. I know I'm doing something wrong but what I don't know.
 
Hard to figure out what's wrong without seeing what you've tried. ;)
 
Iif(Dlookup([NIIN],"PREX",[Material]),"YES","NO") and different variations of iif isnull plus then ones you guys have given me.
 
That's invalid syntax, and no actual criteria. Can you attach the db here?
 
That's invalid syntax, and no actual criteria. Can you attach the db here?
The DB is 39M so it won't but I have attached a pic of the screen from the report and what I have in there now. I realized what I might have been doing wrong, I needed to add the NIIN that the report was based on and then do the validation.
 

Attachments

  • access.jpg
    access.jpg
    101.8 KB · Views: 142

Users who are viewing this thread

Back
Top Bottom