Syntax (1 Viewer)

Smart

Registered User.
Local time
Today, 03:43
Joined
Jun 6, 2005
Messages
436
I am using a stored procedure to update a table
Con.Execute ("Exec sp_Update_People_Root_Cause '" & Me!TxtbehaviourDriver & "','" _
& Me!txtRootID & "','" & Me!Person_Responsible & "','" & Me!DTPicker9 & "','" & Me!cmbLevel_1_ID & "','" _
& Me!CmbLevel_2_ID & "','" & Me!CmbCustContacts & "','" & Me!TxtResponsibletxtBox & "','" & Me!Underlying_Type_ID & "','" _
& Me!ChkMultiplereq & "','" & Me!ChkInDispute & "','" & Me!ChkOther & "' ")

The following paramater Me!Person_Responsible errors because it contains an apostrophe eg martin o'neil
do i need to surrond the parameter with a different type of syntax ?

Help please
 

pdx_man

Just trying to help
Local time
Yesterday, 19:43
Joined
Jan 23, 2001
Messages
1,347
Funny, I just had to do this yesterday.

... & Replace(Me!Person_Responsible, "'", "''") & ...

You have to replace the single quote with two single quotes.
 

Smart

Registered User.
Local time
Today, 03:43
Joined
Jun 6, 2005
Messages
436
syntax

Thanks PDX man it worked like a dream
 

Similar threads

Users who are viewing this thread

Top Bottom