Solved

help with If record appears then this, else that

Posted on 2013-06-14
3
191 Views
Last Modified: 2013-08-13
I have the following data for which I need an iif function and can't quite figure out the syntax.

data:
Name
John Smith
Joe Blow

this data changes so tomorrow it may be
Name
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.
0
Comment
Question by:intsup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 250 total points
ID: 39248460
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
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 250 total points
ID: 39249281
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?
0
 

Author Closing Comment

by:intsup
ID: 39406300
I had to seek a different solution so am closing this one
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question