DLookup in Query Expression (1 Viewer)

gflo

New member
Local time
Today, 06:19
Joined
Jul 13, 2013
Messages
7
I have a field created in a query expression

BirthMon: Format([DOB],"mmmm")

I would like to create another field in the query using DLookup to return the value of the BrithMon.

BrithMonthID=DLookUp("MonID","tblListMons","BirthMon = Mon")

This works good if used with an unbound text box on a form, but when entered into a query expressions, an error is returned: cannot find the name 'BirthMon'

Can I used DLookUp in a Query expression to refer to another Query created field? Thank you
 

namliam

The Mailman - AWF VIP
Local time
Today, 13:19
Joined
Aug 11, 2003
Messages
11,695
why use a DLookup at all? either simply (re)calc again or stack queries....
Doing a quick recalc in this case is the best way I think. Plus this looks like it should be more like a join rather than a DLOOKUP?
 

gflo

New member
Local time
Today, 06:19
Joined
Jul 13, 2013
Messages
7
Thanks mail, I guess I was looking for a reason to use DLookup, stacked queries solved it.
 

Users who are viewing this thread

Top Bottom