How to alter the field ordinal position after the table has been defined?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jlmartinezr
    New Member
    • Nov 2013
    • 1

    How to alter the field ordinal position after the table has been defined?

    I have a table created based in a crosstab query, automatically the table was created with the Totals Column in the second column, how I can alter the ordinal position of column Totals using VBA?

    This comes due that after I show the created table in a web page and the Total columns is showed in second place, additionally this table is dynamic, the rest of the columns could change in name and number of fields, the unique constant is the column Total and I need it in the last column at the right side.
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    Perhaps you could use
    Code:
    Select *, Totals as TotalAmount from tablename
    Of course that would give you the totals column twice but you don't have to do anything with the first.

    Jim

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32661

      #3
      Go into the design of the table and drag the fields you want to reposition.

      You can also drag the fields around when the data is displayed, but that doesn't move the field in the design itself, just where it displays.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        jlmartinezr:
        You've stated that the CTQ is dynamic, in which case, you will need to explain how you are creating the query.
        You'll should also find AB's tutorial on CTQ to be helpful: Allen Browne: Crosstab query techniques

        Comment

        Working...