Solved

DLookup Syntax: DATE; Multiple criteria

Posted on 2013-05-17
2
655 Views
Last Modified: 2013-05-18
Hello ~

Following DLookup works superbly! when "ttSitus" is TEXT string (Thank You Gustav!):
Me.ttSitus = DLookup("[ttSitus]", "tblTimeTracking", "[ttPerson] = '" & Forms!frmTimeTracking!ttPerson & "' And [ttID] = " & DMax("[ttID]", "tblTimeTracking", "[ttPerson] = '" & Forms!frmTimeTracking!ttPerson & "'") & "")

Changing this to work w/ a DATE "ttDates", field = no errors, but returns only NULL value...  Could anyone suggest a revision?:
Me.ttDates = DLookup("# & [ttDates] & #", "tblTimeTracking", "[ttPerson] = '" & Forms!frmTimeTracking!ttPerson & "' And [ttID] = " & DMax("[ttID]", "tblTimeTracking", "[ttPerson] = '" & Forms!frmTimeTracking!ttPerson & "'") & "")
0
Comment
Question by:Chi Is Current
2 Comments
 
LVL 2

Author Comment

by:Chi Is Current
ID: 39176761
To dreamtime now ~~
WCB l-a-t-e-r ~~
Many thanks, Jacob
0
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 39177004
It should read:

 = DLookup("[ttDates]", ...

/gustav
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

685 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