battenberg
Burning candles both ends
- Local time
- Today, 16:04
- Joined
- Sep 25, 2006
- Messages
- 118
Hi
I am using the following code on a DBL click event to move to a new form and open an appropriate record, the problem i am facing is when the company name has an apostraphe in it ie: [two o'clock] the code falls over.
i think this can be solved with bracketing.... can anyone help me with the correct syntax for the bracketing please???
I am using the following code on a DBL click event to move to a new form and open an appropriate record, the problem i am facing is when the company name has an apostraphe in it ie: [two o'clock] the code falls over.
i think this can be solved with bracketing.... can anyone help me with the correct syntax for the bracketing please???
Code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProjects"
stLinkCriteria = "[CompanyName]=" & "'" & Me![CompanyName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria