Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Comment out SQL code?

    Access 2003

    Is there a way to comment out code in an SQL window?

    Or, is there a way to debug SQL code, test variables in the code, etc?

    Thanks . . . Rick

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    If you are talking about SQL within Access, not that I know of. The way to test variables in the code is to use the Immediate window (press Ctrl G anywere within Access). Lets say, you have a Forms!MyForm!MyField as a vaiable in your SQL code. Then to test that, in the Immediate window you can just type a question mark (?) then the Forms... statement and press enter. Access will get the data you requested and print it on the next line.
    HTH,

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502
    Thanks GolferGuy . . .

    Rick

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Rick Schreiber
    Access 2003

    Is there a way to comment out code in an SQL window?

    Or, is there a way to debug SQL code, test variables in the code, etc?
    Nope - Access SQL really is not very sophisticated at all. No comments, no conditional blocks. Even some JET DDL can't be run through Access.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Pretty definitive guide to what you can do:
    http://msdn2.microsoft.com/en-us/lib...ffice.10).aspx

    (note there are three parts to this article - links at the bottom of the page). I would skip the bit re views and stored procedures - hopeless.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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