Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Programmable Query Properties (2003)

    I would like to be able to programatically change items in a query like: the field to be sorted by; whether the field will be sorted ascending or descending; and whether I can change the criteria on the fly. As usual, any reference to a source of information or guidance is appreciated. Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Programmable Query Properties (2003)

    A query has an SQL statement, you can view this by opening the query and selecting View | SQL.
    You can change the SQL statement using code. To be able to do this, you need to become at least slightly familiar with SQL first. Many books about Access and database design contain a section about SQL, there are also online tutorials, for example SQL Tutorial, SQL Tutorial - Learn SQL and many others (search Google for them).

    There are many examples of manipulating queries programmatically in this forum - search for querydef sql.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programmable Query Properties (2003)

    Thanks! Did it with the query SQL option.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programmable Query Properties (2003)

    To HansV ... just to let you know that I'm learning a lot through the SQL sites you directed me to. Thanks a bunch!

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Programmable Query Properties (2003)

    I'm glad they are helpful.

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programmable Query Properties (2003)

    Thanks for the SQL links

    John

Posting Permissions

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