CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: querydefs

  1. #1
    Join Date
    Apr 2001
    Posts
    60

    querydefs

    What's the best way to handle this: A query that takes in values from a VB form, then an Access report based on this same query to create the desired output. I have no problem getting the answers to my query through the use of parameters, but then I am prompted again when the report runs. Do I have to take the results of the query and put them into another table? Or is there a better, easier way to do this ? Thanks.



  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: querydefs

    You can change the querydef.

    ' supposed you are using DAO and your database object is called db
    dim QD as QueryDef
    set QD = DB.QueryDefs("myQuery")
    QD.SQL = "SELECT * FROM table1 WHERE ID=1"
    QD.Close





    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured