Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLookup / DMax Problem

Status
Not open for further replies.

Rjc8513

Technical User
Feb 12, 2001
140
US
I have added a text box to a report which is supposed to display the latest day of the week but I am having trouble getting DLookup to work properly.

I am trying to return the latest day of the week by finding the highest day number. Sat. is [DAY OF WEEK], 1 is [DAY NO], Sun. is [DAY OF WEEK], 2 is [DAY NO], etc.

Here's my code in the Control Source property of the text box:

="through " & DLookup("[DAY OF WEEK]","[tbl DAILY DATA]",DMax("[DAY NO]","[tbl DAILY DATA]"))

Thanks.
 
How about:

[tt]DLookup("[DAY OF WEEK]","[tbl DAILY DATA]","[DAY NO]=" & DMax("[DAY NO]","[tbl DAILY DATA]"))[/tt]

Assuming [DAY NO] is numeric.
 
That did it, Remou! Thank you. I was wrestling with that one for quite a while.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top