Dlookup in a query

joshandsony

Registered User.
Local time
Today, 07:19
Joined
Feb 19, 2009
Messages
59
I have a query from a table that I need a dlookup on. I also have a table with the date range that I need the info from. Here is what I have created so far:
=dlookup("[month]","decoder","po_date" = "[date range] between [1/1/2007] and [12/31/2009]")

I am trying to pull the "PO Date" from a table, look for the date range in the decoder table and send back a value of the month name from the decoder table to my query.

Please Help!
 
welcometoawf.png


A DLookup is only geared for returning a SINGLE value. It would appear, from your use of the date range, that you could have more than one value being returned. So, can you explain again in another way why you are trying to do this in this particular manner?
 
Well, I need to create a pivot table from the date field. I have a query that drops into access with a date on it. I need to create a pivot table from that date, but I don't want my pivot table to show every date in the table. I only want to show the month. For Example:

Delivery Date
2/18/09 I want this to show up in another column as Feb_09

Does this make sense?
 
Just use a format in the query for the date:

MyField:Format([YourDateFieldNameHere], "Mmm_yy")
 

Users who are viewing this thread

Back
Top Bottom