batwings
Registered User.
- Local time
- Today, 22:50
- Joined
- Nov 4, 2007
- Messages
- 40
Hi there
I am struggling with the correct syntax for using "Is Null" , "Is Not Null" and "" when using them in a variable to pass back to an Access Query
I have code, just a segment of a query below using "Is Not Null"
Only problem when I look at my Query in access is that in the criteria field the result is as below.
Ends up like this "Is Not Null"
Ends up as 'Is Not Null'
Access doesn't seem to like either of these, what am I doing wrong here.
Batwings
I am struggling with the correct syntax for using "Is Null" , "Is Not Null" and "" when using them in a variable to pass back to an Access Query
I have code, just a segment of a query below using "Is Not Null"
Code:
Dim strmystring As String
strmystring = "Is Not Null"
Only problem when I look at my Query in access is that in the criteria field the result is as below.
Code:
AND mytable.[field]= " & Chr(34) & strmystring & Chr(34) & ";"
Ends up like this "Is Not Null"
Code:
AND mytable.[field]= ' " & strmystring & " ' ;"
Ends up as 'Is Not Null'
Access doesn't seem to like either of these, what am I doing wrong here.
Batwings