LeanneGodney
Technical User
Hi there,
I am running the following code, which works a dream:
---
Dim cmd As New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "INSERT INTO dbo.tblTradeApprovalDetailsCaveats (TradeApprovalDetailsID, Caveat) VALUES (538, 'This is Kindve a test')"
.Execute
End With
---
Trouble is I would like to include an apostrophe in the word "kindve" = "kind've", but that messes up the command as an apostrophe is seen as the start and end of the text. Anyone know how to include an apostrophe in this text string without the apostrophe causing an error?
Thanks,
Leanne
I am running the following code, which works a dream:
---
Dim cmd As New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "INSERT INTO dbo.tblTradeApprovalDetailsCaveats (TradeApprovalDetailsID, Caveat) VALUES (538, 'This is Kindve a test')"
.Execute
End With
---
Trouble is I would like to include an apostrophe in the word "kindve" = "kind've", but that messes up the command as an apostrophe is seen as the start and end of the text. Anyone know how to include an apostrophe in this text string without the apostrophe causing an error?
Thanks,
Leanne