Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    I fixed the syntax of the larger SQL statement that I am building and all is working. I guess my first couple hundred tries working with a bad SQL stmt messed up my thinking for the rest. By the time I finally decided to use a simpler test SQL stmt I had already messed with the other code so...
  2. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    I changed the code to open the form first, then set the RecordSource of the form = sSQL and it worked perfectly with my simple SQL. Now I need to get to work on the syntax of my larger statement and figure out the rest. I will report back. Thank you both so much for your continued assistance...
  3. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    I forgot to add that, yes, I do understand that there are major differences between using the query as a recordsource and seeing the results of the query. I was just doing that as a test to make sure my SQL syntax was correct. Thanks, Donna
  4. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    I'm sorry, frustration is getting the better of me. I know I should have put more specific results. When I set my sSQL variable = to the RecordSource of the form that I want to open, the form opens but all of the text controls have #NAME in them, no data. I have created a simple sql (select...
  5. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    kjv1611 - No, there is no reason I need to save the query first. This was just a method I found to do it. I tried your method of just setting my sSQL variable = to the RecordSource of the form that I want to open and it didn't work. Once I know the variable sSQL contains a valid query, I can't...
  6. nole10

    Creating New Query Dynamically to use as RecordSource on Form

    Hi all, I have created code to dynamically build a new SQL statement (I used faq705-2205 as a resource) and save it as a query in the current database. The intent is to be able to create a new query any time a user makes selections on a form and requests a 'report'. The report would just be...

Part and Inventory Search

Back
Top