Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order of Controls 1

Status
Not open for further replies.

ShaimaaT

Programmer
Aug 18, 2014
16
0
0
EG
I have some texboxes that I want them to appear in datasheet view with a specific order.

How can I control the order given that I tried tab index and tab order but did not achieve the desired result?
 
Can't find Column order property anywhere . I am using access 2010 .Someone has pointed out that I can drag columns but I seem to be able to do it in a form and not in a subform

How can I do it in a subform?
 
Can't find Column order property anywhere .
Did you actually read the article??? That was basically the whole gist of it that these are "Sorta Hidden".

With the exception of the Subdatasheet properties, you have no direct design-time access to these properties: None of these properties show up in the datasheet's property sheet. As a result, they can only be set at runtime from VBA code in order to make changes. Interestingly, none of the properties are exposed by ADO or ADOX, so if you want to change them, you'll have to use DAO

So I read the article and put numbers in the tag properties of my controls. "1,2,3..."
Then
Code:
Private Sub Form_Load()
  Dim ctrl As Access.Control
  For Each ctrl In Me.Controls
    If Not (ctrl.Tag & "") = "" Then
      If Not ctrl.ControlType = acLabel Then
         ctrl.ColumnOrder = ctrl.Tag
      End If
    End If
 Next ctrl
End Sub
works for me.
 
Thank you very much!

Could you please check my threads titled 'Count of Selected Controls' and 'Event Handler for Mouse Right click and select'?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top