1ST CONDITION: If the Internal Part Number and Revision match that of a pre-existing table in the database then the text displays: In The Database
2ND CONDITION: If the Internal Part Number matches but the Revision does not match that that of the pre-existing table in the database then the text displays : Revision Change
3RD CONDITION: If the Internal Part Number and the Revision does not match that of the pre-existing table in the database then the text displays : Not In The Database
This is the sql that i wrote to help execute this,it works for the first condition but it does not work in the second condition at all
The CM52 Parts is table that i am importing new data into whilst the Details Table already exists (The table that holds all my pre-existing data)
Expand|Select|Wrap|Line Numbers
- IIf([CM52Parts].[Internal Part Number]=[Details].[Internal Part Number]
- And [CM52Parts].[Revision] Is Null Or Not [Details].[Revision],"Revision Change.",
- IIf([CM52Parts].[Internal Part Number]=[Details].[Internal Part Number]
- And [CM52Parts].[Revision]=[Details].[Revision]," In Database.","Not In Database."))
- AS DisplayText,
I have tried a variety of options but none seem to work..
P:S:I am not using a Nz operator because none of my data invloves null values
Any assistance you can offer would be much appreciated