Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 701
  • Last Modified:

DLookup Syntax: DATE; Multiple criteria

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
Chi Is Current
Asked:
Chi Is Current
1 Solution
 
Chi Is CurrentAuthor Commented:
To dreamtime now ~~
WCB l-a-t-e-r ~~
Many thanks, Jacob
0
 
Gustav BrockCIOCommented:
It should read:

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

/gustav
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now