Results 1 to 2 of 2

Thread: Query Behavior

  1. #1
    Join Date
    Mar 2003
    Knoxville, TN - USA

    Unanswered: Query Behavior

    Greetings dbForums,

    Here's what I got....

    I use a form as a menu from which the user can select different queries. To open the selected query the following code is used:
    DoCmd.OpenQuery "qryEmployee", acViewNormal, acReadOnly

    The query is already defined using the most common sort order. Here is what a typical SQL statement looks like:
    SELECT tblEmployee.*
    FROM tblEmployee
    ORDER BY tblEmployee.Last, tblEmployee.Middle, tblEmployee.First;

    I would like the users to be able to sort by using the different fields (if needed) and when they get done and exit the query the changes they made should not be saved.

    It looks as if the acReadOnly option only works for the data not the properties of the query. Is there anyway to make the query's properties readonly?

    Thanks In Advance...

  2. #2
    Join Date
    Sep 2003
    If you've programmed before, you can use a temp query and a read-only datasheet form on your main form to hold the query's results. After the sort order has been determined, you update the query's SQL and requery your subform.
    All code ADO/ADOX unless otherwise specified.

Posting Permissions

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