Hello Everyone,
I'm new to using Access and Visual Basic and am learning as I go along on this project for work.
I'm stumped trying to figure out what works as an escape character in VBA.
Basicaly I want to convert this SQL statement:
WHERE (((Record.Object) Like "*" & [Enter Object] & "*"
)
into a string so I can use it as the wherecondition argument of the OpenForm method.
My problem is with the quotes around the asterix in the SQL statement. my string for the where condition (called stLinkCondition) is like this:
stLinkCondition = "[Record.Object] = Like "*" '" & Me![ObjectEntered] & "' "*" "
(ObjectEntered is a name of a text filed in a form)
This doesn't work because of the " from the SQL, can anyone tell me what I should do to get the " into the string or something that will achieve the same goal?
Thanks
I'm new to using Access and Visual Basic and am learning as I go along on this project for work.
I'm stumped trying to figure out what works as an escape character in VBA.
Basicaly I want to convert this SQL statement:
WHERE (((Record.Object) Like "*" & [Enter Object] & "*"
into a string so I can use it as the wherecondition argument of the OpenForm method.
My problem is with the quotes around the asterix in the SQL statement. my string for the where condition (called stLinkCondition) is like this:
stLinkCondition = "[Record.Object] = Like "*" '" & Me![ObjectEntered] & "' "*" "
(ObjectEntered is a name of a text filed in a form)
This doesn't work because of the " from the SQL, can anyone tell me what I should do to get the " into the string or something that will achieve the same goal?
Thanks