Syntax Problem

atrium

Registered User.
Local time
Tomorrow, 02:13
Joined
May 13, 2014
Messages
348
I can't get this to work

If (DLookup("DdSchedId", "DdSchedules", "[MatterId] = " & Me.MatterIdFld) = True And ([Status] = "Not Active")) Then

Can anyone help please
 
I don't see anything wrong with it. Can you post a screenshot?
 
Is [DdSchedId] a boolean field or an actual number (ID)? The Dlookup would return the actual ID not True. If you want to check if there is a SheduleID for a MatterID you would do: If DCount("*","DdSchedules", "[MatterId] = " & Me.MatterIdFld) >0 AND ... Then

Cheers,
 
If (DLookup("DdSchedId", "DdSchedules", "[MatterId] = " & Me.MatterIdFld) = True And ([Status] = "Not Active")) Then
Try:
Code:
If DLookup("DdSchedId", "DdSchedules", "([MatterId] = " & Me.MatterIdFld & ") And (Status = 'Not Active')") Then
 

Users who are viewing this thread

Back
Top Bottom