Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513

    simple SQL syntax with hyperlink

    I'm getting a sytax error (which is prob blatently simple, but it's getting late....)



    i've been able to isolate the problem to be the portion of the WHERE statement that deals with

    the field BaseCatalogSheet which is a hyperlink
    and the variable vBaseSheet is that is text

    Dim sSQL As String
    sSQL = "Delete from tbeAdditionalPages" & _
    " WHERE [BaseCatalogSheet] = " & vBaseSheet & " and [Type] = '" & Me.Type.Value & "' ;"
    CurrentDb().Execute sSQL, dbFailOnError

    any thoughts would be a hughe help,
    with thanks in advance,
    Mark

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I haven't used it, but I would think the hyperlink would act like text. Have you tried surrounding the value with single quotes like the other one?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    when I add the qoutes, i geta 'data type mismatch error'

    Dim sSQL As String
    sSQL = "Delete from tbeAdditionalPages" & _
    " WHERE [BaseCatalogSheet] = '" & vBaseSheet & "' and [Type] = '" & Me.Type.Value & "' ;"

    CurrentDb().Execute sSQL, dbFailOnError

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Simple Criteria syntax mismatch - please help!
    By whatwouldmattdo in forum Queries
    Replies: 4
    Last Post: 10-19-2011, 04:57 PM
  2. Simple code syntax question
    By mseeker22 in forum Programming
    Replies: 1
    Last Post: 07-07-2011, 03:55 AM
  3. Simple Syntax Help
    By cvegas in forum Programming
    Replies: 7
    Last Post: 04-20-2011, 01:46 PM
  4. Replies: 4
    Last Post: 01-31-2011, 03:19 PM
  5. simple syntax question
    By markjkubicki in forum Programming
    Replies: 6
    Last Post: 09-14-2010, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums