Syntax Error

gojets1721

Registered User.
Local time
Yesterday, 18:06
Joined
Jun 11, 2019
Messages
430
I'm getting a 3075 syntax error on this line. I think I'm missing a quotation or apostrophe somewhere but can't figure it out.

Here's the specific line of code. I'm trying to get a field to equal the value of a combobox

Code:
strTemplate = "TemplateName = '" & Me.comboTemplate

I'm getting a syntax error showing this:
'Template Name = 'Example'

Any suggestions
 
You aren't closing the single quote (presuming it's needed):

strTemplate = "TemplateName = '" & Me.comboTemplate & "'"
 
Just in case, you may not be consistent with the type of data: TemplateName looks like string. A combo record source often uses the ID of the records from the recordsource (altho the ID might not be what is being displayed to the user).
 

Users who are viewing this thread

Back
Top Bottom