Solved

DLookup Syntax: DATE; Multiple criteria

Posted on 2013-05-17
2
663 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

710 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