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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acsess: How to sort a table on a calculated field?

Status
Not open for further replies.

Spruce4U

Technical User
Feb 1, 2006
23
CA
Does anybody know how to sort a table (datasheet view) based on a calculated field?

Access prevents the use of automatic sort buttons (A-Z, Z-A) when clicking on a calc. field column header.

Thanks!

 
First, you don't save calculated fields in a table. If you are, tell me the real good reason you may think you have.
If you make a query and create a calculated column, then after you run the query to get a recordset you can click on the column heading of the calculated field and use the A-Z button.
 
Fneily,

Thanks for the fast answer.

No panic here, there hasn't been any calculated field made in a table.

I was actually done on a form, which itself was based on a query.

I understand from your answer that the calculated field is done directly on the query itself rather than on the form.

I will try that.

Thanks again for your help.

Have a nice day
 
Now don't misunderstand me. You can do the calculation on the form OR within the query Or report. But as you'll see, if the calculation is in the query, you can easily sort the recordset on it. Either way you do the calculation, query or form, there's no reason to store it in a table. Unless all the fields in the calculation process will be static forever, which is quite rare.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top