Results 1 to 6 of 6

Thread: ADO refresh problem

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    10

    ADO refresh problem

    I was looking through my book to see how to use SQL query statements to change the recordsource.

    My first question is... what would be the syntax to make the search criteria be whatever text was entered from a textbox?

    ie. Let form1.ado1.recordsource = "SELECT * FROM data WHERE month = 'txtMonth.text'"

    That's what I am using, but after entering txtMonth and the period it doesn't pop up a list of options so I am assuming it's not recognizing it as and object...

    And i've tried something along the lines of "SELECT * FROM data WHERE month = 'January'"

    And when I run it I get an error message saying

    [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

    Then another box pops up stating that form1.ado1 was unable to be refreshed...

    What am I doing wrong?

    Thanks for the help

    Herb Moyer
    Last edited by Gadreel; May 25th, 2001 at 09:46 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width