Results 1 to 4 of 4
  1. #1
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    30

    Query column order - datasheet vs design view


    I'm in the process of learning the Access interface and I need to understand column ordering for a query in datasheet vs design views. It seems like I can change the column order in design view and that's reflected in the datasheet view, until I make a change in the datasheet view - from that point, changing the order in design view doesn't effect the order in datasheet view. Is there a way to "reset" it so that the datasheet view once again reflects the order in design view?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    when you view the datasheet, clicking SAVE will save that field order.
    just drag the columns the positions then click save again.

  3. #3
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    30
    Quote Originally Posted by ranman256 View Post
    when you view the datasheet, clicking SAVE will save that field order.
    just drag the columns the positions then click save again.
    I think my question may have been misunderstood. Let me rephrase it more succinctly:

    Once you change the order of columns in datasheet view, it no longer reflects the order in design view. How do you get datasheet view to again follow the order in design view?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    in datasheet view, the initial order is set by the order in which fields are selected in the underlying query. If you subsequently add additional fields, they will be added in columns to the right. So far as I know there is no easy way other than deleting all the columns in design view and then selecting them again.

    You might try a bit of code - something along the lines of this untested code in the form load event

    Code:
    dim I as integer
    dim fld as field
    for I=0 to me.recordset.fields.count-1
        me.recordset.fields(I).columnorder=i
    next i

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-31-2017, 11:40 AM
  2. Datasheet format when in Design View
    By GregShah in forum Forms
    Replies: 2
    Last Post: 03-11-2016, 05:10 PM
  3. Replies: 3
    Last Post: 09-18-2015, 07:54 AM
  4. Replies: 2
    Last Post: 01-28-2014, 10:13 PM
  5. Grid Column Order in Datasheet view
    By apotter in forum Forms
    Replies: 3
    Last Post: 03-16-2012, 12:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums