Solved

Column Display Order in Datasheet view

Posted on 2003-12-08
3
972 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
Comment Utility
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
Comment Utility
You can use the ColumnOrder property of a control to specify the position of a column in datasheet view.
0
 

Author Comment

by:sailr
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

744 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

15 Experts available now in Live!

Get 1:1 Help Now