Convert code VBA to expression in query (1 Viewer)

azhar2006

Registered User.
Local time
Today, 08:32
Joined
Feb 8, 2012
Messages
278
Hello friends again
I need help converting this code from VBA to an expression in a query. I've tried hard and failed to turn it into an expression.
Code:
If Not IsNull(Me.txtsucc) Then
        strWhere = strWhere & "([Success] = """ & Me.txtsucc & """) AND "
End If
Thank you very much
 
Me won't work in a query, so you need the full path to txtsucc. Then it would look like this:

...WHERE (([Success]=[Forms]![YourForm]![txtsucc]) OR ([Forms]![YourForm]![txtsucc] IS NULL))...
 
Me won't work in a query, so you need the full path to txtsucc. Then it would look like this:

...WHERE (([Success]=[Forms]![YourForm]![txtsucc]) OR ([Forms]![YourForm]![txtsucc] IS NULL))...
IIf(IsNull([Forms]![frmMastr]![txtsucc]);[Success];[Forms]![frmMastr]![txtsucc])
 

Users who are viewing this thread

Back
Top Bottom