L
Lori
I have a command button that opens a record based on what company is selected
from a combo box.
A new company that I have has an apostrophe in the name. When clicking on
the command button after selecting from combo box I get a syntax error.
I tried doubling up the apostrophe just like you have to do on a label for
the "&" sign. That didn't work.
Can someone help me with this? Here is what I have in the "On Click" Event.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FrmBlueBookCompanies"
stLinkCriteria = "[CompanyName]=" & "'" & Me![BBCoName] & "'"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
from a combo box.
A new company that I have has an apostrophe in the name. When clicking on
the command button after selecting from combo box I get a syntax error.
I tried doubling up the apostrophe just like you have to do on a label for
the "&" sign. That didn't work.
Can someone help me with this? Here is what I have in the "On Click" Event.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FrmBlueBookCompanies"
stLinkCriteria = "[CompanyName]=" & "'" & Me![BBCoName] & "'"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria