I have a customer table (user created and tech support took over) which holds basic customer data - names, address, etc. There is no primary key on this table and no data validations (YET). I have been asked to create a label report that will gather info from table and make labels. Easy to do.....BUT they want the labels to read Mr. & Mrs if the customers are married. There is a field which is home to "spouse name", and a duplicate address check field.
I need my code to look something like this:
If the duplicate address is false, and the spouse name field has data in it, I do not want to do anything with it. That record should be covered in the If, Else statement. Providing the users are doing data entry correct.
Thank you for assisting me on this on. I have been playing with the IIF statement and if then statement in the query and am getting nowhere. I assume my coding placement is off somewhere.
I need my code to look something like this:
IF duplicate address is false AND spouse name is spaces, then print out fname, lname, address, etc.... on labels
ELSE if the duplicate address is true then match the addresses fields to each other, AND match the spouse name on one record to the first name on the other record and only then print out Mr. & Mrs. lname, address, etc...
ELSE if the duplicate address is true then match the addresses fields to each other, AND match the spouse name on one record to the first name on the other record and only then print out Mr. & Mrs. lname, address, etc...
Thank you for assisting me on this on. I have been playing with the IIF statement and if then statement in the query and am getting nowhere. I assume my coding placement is off somewhere.
Comment