F
Frank Dulk
I am using the structure of a code, that is to name the origin of the
controls and labels in time of execution....
It follows the code
Dim rs As Recordset, I As Integer
Set rs = Me.RecordsetClone ' Define o recordset.
With rs
For I = 0 To .Fields.Count - 1
Me("uc" & I).ControlSource = .Fields(I).Name
Select Case I
Case 0, 1
Me("u" & I).Caption = .Fields(I).Name
Case 2
Me("u" & I).Caption = .Fields(I).Name
Case 3
Me("u" & I).Caption = .Fields(I).Name
Case 4
Me("u" & I).Caption = .Fields(I).Name
Case 5
Me("u" & I).Caption = .Fields(I).Name
Case 6
Me("u" & I).Caption = .Fields(I).Name
Case 7
Me("u" & I).Caption = .Fields(I).Name
Case 8
Me("u" & I).Caption = .Fields(I).Name
Case 9
Me("u" & I).Caption = .Fields(I).Name
Case 10
Me("u" & I).Caption = .Fields(I).Name
Case 11
Me("u" & I).Caption = .Fields(I).Name
Case 12
Me("u" & I).Caption = .Fields(I).Name
Case 13
Me("u" & I).Caption = .Fields(I).Name
Case 14
Me("u" & I).Caption = .Fields(I).Name
Case 15
Me("u" & I).Caption = .Fields(I).Name
Case 16
Me("u" & I).Caption = .Fields(I).Name
Case Else
MsgBox "Entre em contato"
End Select
Me("uc" & I).Visible = True
Me("u" & I).Visible = True
Next I
End With
rs.Close
Set rs = Nothing
however I am trying to embed in this code, a way to name in the baseboard of
the form them origin of the totals of each column...
The fields of the totals have numbering similar empty space from 0 to 16 and
nominated with t....
how to do to catch the columns in the redordset, to create her formulates...
=Soma([colunarespectiva]) and it updates that in the controls t0 ...t16
if somebody has an idea....
controls and labels in time of execution....
It follows the code
Dim rs As Recordset, I As Integer
Set rs = Me.RecordsetClone ' Define o recordset.
With rs
For I = 0 To .Fields.Count - 1
Me("uc" & I).ControlSource = .Fields(I).Name
Select Case I
Case 0, 1
Me("u" & I).Caption = .Fields(I).Name
Case 2
Me("u" & I).Caption = .Fields(I).Name
Case 3
Me("u" & I).Caption = .Fields(I).Name
Case 4
Me("u" & I).Caption = .Fields(I).Name
Case 5
Me("u" & I).Caption = .Fields(I).Name
Case 6
Me("u" & I).Caption = .Fields(I).Name
Case 7
Me("u" & I).Caption = .Fields(I).Name
Case 8
Me("u" & I).Caption = .Fields(I).Name
Case 9
Me("u" & I).Caption = .Fields(I).Name
Case 10
Me("u" & I).Caption = .Fields(I).Name
Case 11
Me("u" & I).Caption = .Fields(I).Name
Case 12
Me("u" & I).Caption = .Fields(I).Name
Case 13
Me("u" & I).Caption = .Fields(I).Name
Case 14
Me("u" & I).Caption = .Fields(I).Name
Case 15
Me("u" & I).Caption = .Fields(I).Name
Case 16
Me("u" & I).Caption = .Fields(I).Name
Case Else
MsgBox "Entre em contato"
End Select
Me("uc" & I).Visible = True
Me("u" & I).Visible = True
Next I
End With
rs.Close
Set rs = Nothing
however I am trying to embed in this code, a way to name in the baseboard of
the form them origin of the totals of each column...
The fields of the totals have numbering similar empty space from 0 to 16 and
nominated with t....
how to do to catch the columns in the redordset, to create her formulates...
=Soma([colunarespectiva]) and it updates that in the controls t0 ...t16
if somebody has an idea....