Solved

Column Display Order in Datasheet view

Posted on 2003-12-08
3
973 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

867 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now