Open Report with not null condition (1 Viewer)

xdenama

Registered User.
Local time
Today, 15:52
Joined
Dec 4, 2015
Messages
26
How to open report with two condition like this

Code:
DoCmd.OpenReport ReportName:="Test4", WhereCondition:="ID = " & !ID And Me.[SEK_1] Is Not Null, View:=acViewPreview, WindowMode:=acHidden

First condition
Code:
="ID = " & !ID
is ok
but when I put second condition
Code:
And Me.[SEK_1] Is Not Null
the return massage, Access Run-Time error 2465. Can't find the field '|1' referred to in your expression appear
 

June7

AWF VIP
Local time
Today, 14:52
Joined
Mar 9, 2014
Messages
5,466
Need concatenation and quote marks:

WhereCondition:="ID = " & !ID & " And Me.[SEK_1] Is Not Null"
 

xdenama

Registered User.
Local time
Today, 15:52
Joined
Dec 4, 2015
Messages
26
Need concatenation and quote marks:

WhereCondition:="ID = " & !ID & " And Me.[SEK_1] Is Not Null"
Thanks a lot (y)
 

Users who are viewing this thread

Top Bottom