R
RTY
I'm new to writing VBA code and this is the SQL statement giving me trouble
strSQL3 = "Select * from [Resource Savings Table] Where (SOW = " _
& [Forms]![SOW Document Tracker]![SOW] & " And [Resource Name] = " &
ResourceName & ")"
Both of the arguments are text. So when I call rs.Open it doesn't like the
fact there are no quote marks around the text fields.
I believe it should read like
strSQL3 = "Select * from [Resource Savings Table] Where (SOW = " _
& '[Forms]![SOW Document Tracker]![SOW]' & " And [Resource Name] = " &
'ResourceName' & ")"
but the compiler is makes the assumption that after any ' its now a
comment. How do I get this to work?
strSQL3 = "Select * from [Resource Savings Table] Where (SOW = " _
& [Forms]![SOW Document Tracker]![SOW] & " And [Resource Name] = " &
ResourceName & ")"
Both of the arguments are text. So when I call rs.Open it doesn't like the
fact there are no quote marks around the text fields.
I believe it should read like
strSQL3 = "Select * from [Resource Savings Table] Where (SOW = " _
& '[Forms]![SOW Document Tracker]![SOW]' & " And [Resource Name] = " &
'ResourceName' & ")"
but the compiler is makes the assumption that after any ' its now a
comment. How do I get this to work?