Return the Name of a field in a Query.

J

jon.ingram

I have an access data set that essentially looks like this:

Policy# Status Rec'dDate IssuedDate PlacedDate

1 Rec'd 12/1/05
2 Issued 01/01/06 02/01/06
3 Placed 2/15/06 02/28/06 3/10/06


The status field is suppose to refresh in a data feed to take the max
date and return the status, I want to validate this to make sure it is
working correctly, so I was thinking I could write a query that takes
the max date and returns what field name it came from. Anyone out
there ever do anything like this that I might be able to piggy back off
of? TIA for any help.
 
R

Rick B

Just update the field. Use a nested IF statement that says...

If PlacedDate is not null, then staus equals "Placed" otherwise, if
IssuedDate is not null, then status equals "Issued", other wise, status
equals "Rec'd"
 
J

jon.ingram

I wish it were that easy the thing is that there are several more
status in there that items can move forward and backwards through so I
need to use some type of max function that spans across the fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dlookup 7
Min Question 1
Using DateAdd and IIF conditions in a Query 2
date range query between 2 tables 2
Access Running Balance in Access 1
Sum amount of days in another coloumn 8
Date Key fields 1
Date 2

Top