hello everybody
I h ave a question please, which i managed to resolve
but i am looking for a better coding
i want to simply say this
If p = RS!SCOD Then
nameOfCr = p & "_CR_" & code
defautCrC = Forms![myForm]!nameOfCr
however i had to do it this way, since it doesn t recognize nameOfCr in : defautCrC = Forms![myForm]!nameOfCr
If p = RS!SCOD Then
nameOfCr = p & "_CR_" & code
For Each ctl In frm.Controls
If ctl.ControlType = acTextBox Then
If ctl.Name = nameOfCr Then
defautCrC = ctl.Value
Exit For
End If
End If
Next ctl
is there a way to do it?
thank you
Lina
I h ave a question please, which i managed to resolve
but i am looking for a better coding
i want to simply say this
If p = RS!SCOD Then
nameOfCr = p & "_CR_" & code
defautCrC = Forms![myForm]!nameOfCr
however i had to do it this way, since it doesn t recognize nameOfCr in : defautCrC = Forms![myForm]!nameOfCr
If p = RS!SCOD Then
nameOfCr = p & "_CR_" & code
For Each ctl In frm.Controls
If ctl.ControlType = acTextBox Then
If ctl.Name = nameOfCr Then
defautCrC = ctl.Value
Exit For
End If
End If
Next ctl
is there a way to do it?
thank you
Lina