Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010

    Unanswered: Viewing the results of an SQL String

    I've made an SQL string within VB.

    Is there a way for me to view the results of my statement?

    My string is called strSQL

    I have a form with several text boxes and depending on what boxes have text in them I want to add to my SQL which is why I have built it up in a string as apposed to making a query.

    Is there nothing like an Open Query function where i can run my SQL and see my results?

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    you could copy your SQL to the copy buffer and paste it into a query
    you could put a watch/breakpoint on the code and view the value of strsql in the immedaite window
    you could display the SQL to a message box
    AFAIK there is no way executing that query and see the results inside the code short of lettign the code run its course and process the result set
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2010
    What you want is the RunSQL command of the DoCmd object.

    DoCmd****nSQL strSQL
    Last edited by RickyTicky; 12-28-10 at 17:00.

  4. #4
    Join Date
    Aug 2009
    Did this code helped 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