Thread: Query Behavior
02-18-04, 09:11 #1Registered User
- Join Date
- Mar 2003
- Knoxville, TN - USA
Unanswered: Query Behavior
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:
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...
02-18-04, 11:01 #2Registered User
- 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.