Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

help with If record appears then this, else that

Posted on 2013-06-14
3
Medium Priority
?
198 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 40

Accepted Solution

by:
als315 earned 1000 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…
Suggested Courses

885 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