Solved

help with If record appears then this, else that

Posted on 2013-06-14
3
184 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
3 Comments
 
LVL 39

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now