G
Guest
I must Search all the Fields that start with TxtAC that are in a form.
Each TxtAC field contains a number.
A Variable contains the name of the Field for which I must extract a number
to find a record in a Table that contains formulas.
The Users Group has been a big help so far in reducing the number of lines
(Currently between 16,000 and 16,500) of code in my program.
I have never used Controls before and this is where I need some help.
A sub-routine gets the record(s) that contain the formulas. It is names
GetRangeRec and works great.
Here is my present Code:
Dim HldCntrl as Control
Dim HldField as String
Dim IndxA as Byte
IndxA = 0
Do Until IndxA = 20
IndxA = IndxA + 1
HldCntrl = "TxtAC" & Format(IndxA, "00") Here is the
line that fails
HldField = Me("TxtAC" & Format(IndxA, "00"))
' MsgBox HldCntrl & " - " & HldField
' GetRangeRec(HldField, HldCntrl)
Loop
The Mesage I Get is:
Object variable or With block variable not set
Does anyone know what I am doing wrong?
Continued Help is Greatly Appreciated!
Granny
Each TxtAC field contains a number.
A Variable contains the name of the Field for which I must extract a number
to find a record in a Table that contains formulas.
The Users Group has been a big help so far in reducing the number of lines
(Currently between 16,000 and 16,500) of code in my program.
I have never used Controls before and this is where I need some help.
A sub-routine gets the record(s) that contain the formulas. It is names
GetRangeRec and works great.
Here is my present Code:
Dim HldCntrl as Control
Dim HldField as String
Dim IndxA as Byte
IndxA = 0
Do Until IndxA = 20
IndxA = IndxA + 1
HldCntrl = "TxtAC" & Format(IndxA, "00") Here is the
line that fails
HldField = Me("TxtAC" & Format(IndxA, "00"))
' MsgBox HldCntrl & " - " & HldField
' GetRangeRec(HldField, HldCntrl)
Loop
The Mesage I Get is:
Object variable or With block variable not set
Does anyone know what I am doing wrong?
Continued Help is Greatly Appreciated!
Granny