Problem With Column Order in Subform Datasheet View (1 Viewer)

NoSmoke

Registered User.
Local time
Today, 15:36
Joined
Nov 10, 2012
Messages
99
I'm getting no-where with this and am hoping someone can help. I have a subform in which I display a table in Datasheet View. The problem is, I cannot figure out how to place the columns in the order (i.e. from left to right) I want.

For some reason, right-clicking on a column header in Form View and selecting Freeze Fields will shift that column to the left but I can find no consistant pattern to it and no other way of shifting a column. Reordering the columns in the table itself seems to have no effect on the order they appear on the subform and moving the controls around in the subform in Design View also seems to have no effect.

Can anyone please offer a solution?

TIA for any help.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:36
Joined
Feb 19, 2013
Messages
16,609
Datasheet properties are only available when in datasheet view or via vba.

To get the columns in the order you want, with the form in datasheet view, drag the columns into the order you want by clicking and holding on the column heading and dragging left/right. Then save the form

To do this in vba, refer to this link

http://msdn.microsoft.com/en-us/library/office/aa217449(v=office.11).aspx

A useful tip is that once you have the columns in the order you want, freeze them, then the user cannot move them around although they can still adjust the widths- however they can still unfreeze them by right clicking on the column heading. Also be aware that once frozen the bottom scroll bar will disappear so you need to ensure the form is sized so all columns are visible.
 

NoSmoke

Registered User.
Local time
Today, 15:36
Joined
Nov 10, 2012
Messages
99
Hey CJ, I had tried earlier what you suggest (click and drag the column heading) but all that does is highlight the column clicked on followed by highlighting the adjacent columns as the cursor is moved left or right. However, I have just noticed that, in Form View, placing the cursor at the very bottom of the (sub form) column heading results in the cursor changing to a four directional arrow. If one then clicks, a black vertical bar appears to the left of the column which can then be dragged left or right to the new column location. Also, Freeze Fields does not remove the bottom scroll bar. Maybe we are using different Access versions (I have 2010)??

Anyhow, problem solved!
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 22:36
Joined
Feb 19, 2013
Messages
16,609
Also, Freeze Fields does not remove the bottom scroll bar.
It will do if you freeze all the columns or all but 1
 

scooterg

New member
Local time
Today, 17:36
Joined
Mar 30, 2013
Messages
4
Try dragging and drop the column to the place you want it to stay. Then Right Click and Hide Column Your not really hiding it just Access does not save well. When you close the hide Box it will ask you to save it. That will save the column Order
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 22:36
Joined
Sep 12, 2006
Messages
15,653
out of interest, are you using an mde/accde? I am pretty sure that datasheet changes in one of these are not preserved between sessions.
 

NoSmoke

Registered User.
Local time
Today, 15:36
Joined
Nov 10, 2012
Messages
99
Try dragging and drop the column to the place you want it to stay. Then Right Click and Hide Column Your not really hiding it just Access does not save well. When you close the hide Box it will ask you to save it. That will save the column Order

Not following this - are you referring to Unhide Fields?

I agree however that "Access does not save well". I always click Save in the Quick access tool bar to be sure(er).
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 22:36
Joined
Sep 12, 2006
Messages
15,653
I think the columns will be placed on the form in the order that they appear in the forms query.

if you are using a table directly, you will not be able to change this - so use a query instead.
 

Pieter de la Court

New member
Local time
Today, 23:36
Joined
Dec 22, 2018
Messages
2
Freezing or unfreezing columns did not help for me (I use Access 2016). The unlikely solution of hiding and then unhiding the column did it for me (after dragging it to the right place). I saw this suggestion also on other websites.
Thanks scooterg!
 

Users who are viewing this thread

Top Bottom