Results 1 to 6 of 6

Thread: SQL VBA Error

  1. #1
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    21

    Unanswered: SQL VBA Error

    I'm trying to run an SQL query that I built using the design view in MS Access, by using VBA, as i plan to add in variables but when I run it I get an error.
    I'm not sure what if anything is wrong.

    I've attached a screen shot of the code and an error.

  2. #2
    Join Date
    Sep 2003
    Posts
    228
    I don't see your screen shot....

  3. #3
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    21
    It's on as an attachment

  4. #4
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    21
    It wasnt showing for some reason I'ev loaded it again
    Attached Thumbnails Attached Thumbnails SQL Error.gif  

  5. #5
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi
    Looking at the screen shot (not so good for copying code!) it looks like you need a space before WHERE, it probably thinks this is part of the join expresseion. There may be other spaces missing!

    MTB

  6. #6
    Join Date
    Sep 2003
    Posts
    228
    Add a space to the end of each line except for the last. Let us know if that works for you...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •