473,659 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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.
Nov 7 '13 #1
3 2133
jimatqsi
1,276 Recognized Expert Top Contributor
Perhaps you could use
Expand|Select|Wrap|Line Numbers
  1. 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
Nov 8 '13 #2
NeoPa
32,568 Recognized Expert Moderator MVP
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.
Nov 9 '13 #3
zmbd
5,501 Recognized Expert Moderator Expert
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
Nov 12 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
2905
by: Peter | last post by:
Can anyone tell me how to change the data type of a field in a table created with a make table query? The field is a binary and must be changed to text. alternately does anyone know how to specify the field type when running a make table query? Thanks, Sven
13
2506
by: MLH | last post by:
I have a form with two controls: !! - combo box !! - text box A button on the form tries to run this SQL when clicked... INSERT INTO BodyMsgsSent (ToWhom, BodyText) SELECT DISTINCTROW !! AS MyTargets, !! AS MyList; When the SQL runs, it fails with msg saying "Field length is too
7
3278
by: Amy | last post by:
I'm trying to add an autoincrementing id to a table based on an existing field Name, but Name has duplicated records. How can I do that in ACCESS? Thanks. Amy
7
27162
by: No Spam | last post by:
Dear Access 2003 users, Can anyone assist me with creating either code (preferred) or a query that would remove a single field (called ID) from a table? And as a bonus question, can anyone assist with adding a field (called ID) to a table and then make it an Autonumber data type? I've been successful in adding the field via code, but cannot make it an autonumber field. Thanks a million in advance! Kevin
3
8994
by: SamIAm | last post by:
Hi I have a ListBox called lstListOfStuff I want to get the ordinal position of a ListItem so that I can insert a new ListItem below it. How do I do this? I cannot find any members to give me the index position of an item? Thanks,
1
1738
by: Wei Wang | last post by:
Hi, Sorry for asking the dynamic command question without thoroughly reading the documentation first. Thanks a lot for your reply, Richard. ;-) Now this may be a naive SQL question: Is there any way to refer to the nth field of a table? For example, when I already know the schema of a table( I know it's first field is integer, second and third are text), but
11
1965
by: Bjørn T Johansen | last post by:
Is it possible to alter field type (from varchar to text) without making a new table? Regards, BTJ -- -----------------------------------------------------------------------------------------------
24
8491
by: Donald Grove | last post by:
I want to populate an array with values from an ado recordset (multiple rows) I use the absolute position of the cursor in the recordset to define the row of my array to be populated. I have a workaround for lack of a way to define the ordinal position of a field (incrementing a counter variable), but it feels so primitive: dim Fld as Field dim rst1 as new adodb.recordset
4
2434
by: bpneary1 | last post by:
First of all, I want to thank everyone who posts messages in this group. I am very new to VB and developing full-blown database apps, and I have learned a great deal by reading these posts, so I am very grateful. I have a problem that I have been working on, and I was wondering if anyone had a simple solution. I have a table of data similar to the example shown below:
2
1428
by: jaad | last post by:
Ok I am seriously starting to scare myself with this one. I've only been dealing with Access 2007 since August of 2009 and being a newbee I made a lot of mistakes but learned a lot since then. My question today is about copying a control field from one table to another, is this a good or bad thing? I am asking because I was adding a multi select control field from one table to another which carry the same value in both table and figured...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.