Syntax for a Variable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am unable to get the syntax correct for defining a variable with an AND
statement. Both of the values are strings.

Dim stWhere As String
stWhere = ("[GrantProgram] = '" & [txtGrantProgram] & "'")
stWhere = stWhere And " & ("[Grantee] = '" & [txtGrantee] & "'")"

This is only the latest one. I've tried many other combinations of
punctuation without success. Can someone help me with this and point me to a
resource that gives a thorough explanation of the "punctuation" used in these
statements?

Thanks,
 
Dim stWhere As String
stWhere = "[GrantProgram] = '" & [txtGrantProgram] & "'"
stWhere = stWhere & " And " & "[Grantee] = '" & [txtGrantee] & "'"
 
Back
Top