• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

help with If record appears then this, else that

I have the following data for which I need an iif function and can't quite figure out the syntax.

John Smith
Joe Blow

this data changes so tomorrow it may be
Greg Smith
Jane Doe

I need an iif statement that will do the following:

iif ([name]="John Smith", "Update", "ADD")

the problem i'm having is I ONLY want to do this for John Smith.  I can't set the criteria of [Name]="John Smith" because that defeats the purpose of the iif statement..

basically, if John Smith appears today, regardless of who else is in the field today, then I want to update another field but if John Smith does not appear today I want to add the field.

I hope that's not confusing and appreciate your help.
2 Solutions
Will be better if you upload samble DB. An idea may be following: add query with date and Name with criteria ="John Smith". Join your table and this query by date field and update data
Helen FeddemaCommented:
What do you mean by "the data changes"?  Are records overwritten with new data, are new records added, or what?  Is the data filtered somehow?  What does it mean for "John Smith" to appear today?
intsupAuthor Commented:
I had to seek a different solution so am closing this one
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now