Solved

Column Display Order in Datasheet view

Posted on 2003-12-08
3
976 Views
Last Modified: 2007-12-19
Hi All
I have a form with a subform which gets its recordset from different queries. A combo box on the main form determines which query will be used to fill the recordset of the subform.
For example when a user selects "Company" from the combo box. a query designed to sort data on company will be used to fill the subforms's dataset.
My problem is that I need to display the company field as the 1st column in the data sheet.
This ofcourse will change depending upon the choice made from the combo-box. Is it possible to change the display position of the columns in datasheet programmitically?
0
Comment
Question by:sailr
3 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9897333
Hey sailr!

  You need to assure that the Company field is always the first column to fill a control.
  The datasheet view is driven by the ordinal position of the form controls

  You can change the ordinal positions of the forms controls but only while the form in is design view.
  If you are dynamically assigning bindings to controls in an interative routine, you could re-write the recordsouce sql in the field order needed to present the view you desire.

regards
Jack
0
 
LVL 8

Accepted Solution

by:
MrRobin earned 250 total points
ID: 9897347
You can use the ColumnOrder property of a control to specify the position of a column in datasheet view.
0
 

Author Comment

by:sailr
ID: 9897427
Thanks jadedata, I had already tried re-arranging the fields in the sql but that had not worked.

However MrRobin's suggestion worked just the way I wanted it to. Thanks MrRobin.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question