Solved

DLookup Syntax: DATE; Multiple criteria

Posted on 2013-05-17
2
616 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 49

Accepted Solution

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

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

/gustav
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now