RESOLVED. Thanks to "jmcilhinney"
Please help me how to cycle through the controls below starting from left to right and then continue to the next row until the end of the form.
The problem is that the controls are not focused in the order from left to right. It starts anywhere on the form. I would like to start with the most left and then one by one toward the right.
Here is my code so far:
Note: I only want to read textboxes and comboboxes.
For I = 1 ToMe.Controls.Count - 1 ' cycle through the controls on the form.
' select only textboxes and comboboxes controls to extract data
If ((TypeOfMe.Controls(I) Is TextBox) Or (TypeOfMe.Controls(I) Is ComboBox)) And (Me.Controls(I).Text <> "") Then
.....
End If
Next I
Thank you everyone,
Dominico
Please help me how to cycle through the controls below starting from left to right and then continue to the next row until the end of the form.
The problem is that the controls are not focused in the order from left to right. It starts anywhere on the form. I would like to start with the most left and then one by one toward the right.
Here is my code so far:
Note: I only want to read textboxes and comboboxes.
For I = 1 ToMe.Controls.Count - 1 ' cycle through the controls on the form.
' select only textboxes and comboboxes controls to extract data
If ((TypeOfMe.Controls(I) Is TextBox) Or (TypeOfMe.Controls(I) Is ComboBox)) And (Me.Controls(I).Text <> "") Then
.....
End If
Next I
Thank you everyone,
Dominico
Last edited: