Change Column Position of crosstab query (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


accessman -> Change Column Position of crosstab query (6/18/2006 16:05:12)

Hi :

I have a question,

Table1:

Company, Start Month, End Month, Fees, Calc
ABC_________Mar-05___Mar-05____7 ____1
ABC_________Mar-05___Apr-05____7_____2
ABC_________Apr-05___Apr-05____5_____4


I used crosstab to make this format

Company, Start Month, Fees, Mar-05 , Apr-05
ABC_______Mar-05 _____7_____1_______2
ABC_______Apr-05______5 ____________4


I want to change column position as following order:
Company, Start Month, Mar-05 , Apr-05, Fees
ABC_________Mar-05____1_______2_____7
ABC_________Apr-05____________4 _____5

I tried to use this code:

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qd As QueryDef

Set db = CurrentDb
Set qd = db.QueryDefs("report_crosstab")

qd.fields("Fees").OrdinalPosition = 4


It doesn't work for crosstab query.

Can anybody tell me how to change the column position of the query?

Please let me know, thanks.




yb2 -> RE: Change Column Position of crosstab query (6/18/2006 18:47:56)

Have you run the Crosstab wizard?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625