Help with SQL String from Access Query



I need to get this UPDATE statement, which runs correctly as an Access Query
and correctly use this as a string in my VB6/ADO application. Any help is
appreciated as I am not doing this correctly.

Existing Access Query:

UPDATE TBLPID SET TBLPID.f_TBLPID_PID = Left([f_TBLPID_PID],4) & "-" &
Mid([f_TBLPID_PID],5,2) & "-" & Mid([f_TBLPID_PID],7,4);


Need something like:

Dim sql As String
sql = "UPDATE TBLPID SET TBLPID.f_TBLPID_PID = Left([f_TBLPID_PID],4) & "" -
"" & Mid([f_TBLPID_PID],5,2) & "" - "" & Mid([f_TBLPID_PID],7,4);"""

.



Relevant Pages

  • Re: Seed being cached when using Rnd from asp
    ... Pass random number in querystring to results page. ... On results page pass this random number in the string to the ... In the Access query Order By like this: ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Moving to the end of a paragarph with vba
    ... and inserts data from an Access query at a specific ... bookmark in the word document. ... to pick up another text string to insert at the bookmark. ...
    (microsoft.public.word.vba.general)
  • Moving to the end of a paragarph with vba
    ... and inserts data from an Access query at a specific ... bookmark in the word document. ... to pick up another text string to insert at the bookmark. ...
    (microsoft.public.word.vba.general)
  • RE: How do I convert a date to text in Access XP
    ... convert to string after formating ... "Dudley" wrote: ... > Can anyone advise the code to use an Access query to convert a date or time ...
    (microsoft.public.access.queries)
  • Re: Error message on assignment line before rs.update
    ... TenderType as string ... as to what an Update statement would look like based on the Query. ...
    (microsoft.public.vb.database.ado)