S
Scott
I've created a 4 generation pedigree form. With a loop, I'm trying to Null
several fields on Form4 but my code is wrong. My code is using 'stTemp'
instead of the value of variable stTemp. The names go from H01...H31
Dim stFieldName As Integer
Dim stLetter As String
Dim stTemp As String
For stFieldName = 1 To 31
stTemp = IIf(stFieldName < 10, "H0" & LTrim(Str(stFieldName)), "H" &
LTrim((Str(stFieldName))))
MsgBox (stTemp)
Me![stTemp] = Null
Next stFieldName
I Get error "Can't find the field 'stTemp referenced to in your expression'
I can comment out Me![stTemp] and the Msgbox line will loop thru as expected.
Thanks in Advance for any help!
Scott
several fields on Form4 but my code is wrong. My code is using 'stTemp'
instead of the value of variable stTemp. The names go from H01...H31
Dim stFieldName As Integer
Dim stLetter As String
Dim stTemp As String
For stFieldName = 1 To 31
stTemp = IIf(stFieldName < 10, "H0" & LTrim(Str(stFieldName)), "H" &
LTrim((Str(stFieldName))))
MsgBox (stTemp)
Me![stTemp] = Null
Next stFieldName
I Get error "Can't find the field 'stTemp referenced to in your expression'
I can comment out Me![stTemp] and the Msgbox line will loop thru as expected.
Thanks in Advance for any help!
Scott