Rank query in macro

Judge

New Member
Joined
Jan 23, 2004
Messages
9
I finally figured out to get my rank query to work but it doesn't seem to use updated numbers when I run it in a macro. I originally followed the instructions off a MS article referenced on this message board to get the query to work and I'm assuming my problem lies in the fact that I have changed the table name in the query. The articles instructions say:

If the property sheet is not displayed, click Properties button on the toolbar.
Click the title bar of the Employees field list, and then set the field list's Alias property to Emp1.

I originally changed the name of my table to Terr1 and when I run the queries that this table is based on, the numbers do not change.

Does anyone have any idea how I can get this to work?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
It is a little hard to say based on your description , but if you have changed the name of a table you will have to go back to the query and change the table in the query also. If you open the quey in design view, you can remove the table with the incorrect name, then insert the new table name and make the same field selections.
I'm assuming that when you say a "rank" query , that you are using a Select query with an Order by clause?

The macro should run correctly after the query has been repaired.
 
Upvote 0

Forum statistics

Threads
1,221,798
Messages
6,162,027
Members
451,737
Latest member
MRASHLEY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top