Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Set field sequence of a form in sheetview

Posted on 2016-09-16
9
Medium Priority
?
93 Views
Last Modified: 2016-09-17
I added a field to a table which is part of an existing query and then included the field in the query design in the position that I want it to display.
When I view the query, the field is in the required position.
I also inserted a field in the corresponding form in the required position.
When I view the form in sheetview, the new field is right at the right hand end of the fields.
Is there a way of determining the field sequence without using VBA?
This is what I did. The field in question is [Confirm].
Query design: query design
Form  design: form designDatasheet view: Datasheet viewThanks
0
Comment
Question by:Fritz Paul
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 49

Expert Comment

by:Dale Fye
ID: 41801571
Theoretically, in datasheet view, you should be able to drag the column to where you want it, and then click the save button in the QAT.  That should save the position.
0
 

Author Comment

by:Fritz Paul
ID: 41801580
You've got me. What is the "QAT"? Please.
0
 

Author Comment

by:Fritz Paul
ID: 41801584
Oh OK, I found it on Google.
No it does not work.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 52

Assisted Solution

by:Gustav Brock
Gustav Brock earned 500 total points
ID: 41801623
You do that by setting (in code only) the property ColumnOrder of the textbox/combobox.

First control has no. 1, and if you set a control to, say, 4, those with values of 4 and higher will be shifted up by 1.

/gustav
0
 
LVL 49

Assisted Solution

by:Dale Fye
Dale Fye earned 500 total points
ID: 41801691
Then use the technique that Gustav mentions.

Use the Load event of the form, and code similar to the following,  I generally set them in reverse order, right to left, setting the columnorder to zero for each control.

Private Sub Form_Load

    me.controls("txtFarRight").columnOrder = 0
    me.controls("nextCol").columnorder = 0
    ...
    me.controls("farLeftControl").columnorder = 0

End Sub

Open in new window

 If you step through this, you should see each control moved into the first position and then shift to the right as the next control is repositioned.

I've also got an EE article on allowing users to customize their datasheet column orders and widths, and then save those settings for the next time they load a datasheet.
0
 
LVL 40

Accepted Solution

by:
PatHartman earned 1000 total points
ID: 41801879
MS has completely hosed the way datasheets work in newer versions of Access.  It is virtually impossible to control position and width of columns.  Someone on the team should look at how this worked in A2003 and go back to that feature set.

When you add a new control to a form it is always a good idea to press the TabOrder icon on the Design tab and then either press the Auto Order button or manually rearrange the sequence.  You can also do this by typing a number into the tab index property of an individual control.  I usually end up doing one or all of these depending on how many controls I am repositioning and how complex the form is.

Also, the picture you displayed does not show the form design of a DS form.  It looks like a continuous form.  When you display this form in DS view, you will have trouble changing the column names since there are no labels attached to the textboxes and that is what Access is going to use to create the column headings.  If you use a Continuous format form and display it as DS, Access uses the column names from the query as the column headers.  It was years before I worked this out.  Nothing in the documentation mentions this.  I used to avoid using DS subforms because I never want to use my internal column names as the column headers.
DSViewLayout.JPGNotice that the column headers match the control labels rather than the column names.
DSViewData.JPG
0
 

Author Comment

by:Fritz Paul
ID: 41802254
Dear PatHartman,

Thanks for your reply. It looks like what I was looking for and I will test it out and give feedback.

I know the VBA method, but specifically asked "Is there a way of determining the field sequence without using VBA?".

Thanks.
0
 
LVL 40

Expert Comment

by:PatHartman
ID: 41802273
The problem is as I said in my opening statement, MS has completely hosed this process.  USUALLY, setting the tab order will get the columns in the desired order but not always.  SOMETIMES, if the tab order won't work, you can open the form in Layout view and drag the columns around.  It is getting your edits to stick that is so elusive.
0
 

Author Closing Comment

by:Fritz Paul
ID: 41803025
Thanks guys.
It is solved, but this is such an unfriendly process, just to get your fields in required sequence!
Regards
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

916 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