Hello, why doesn't this work?
I am trying to update several fields on a form, the problem is this: Forms![frm_CreateContract].strField
Here is my code:
Set db = CurrentDb
Set tdf = db.TableDefs("tbl_Adendumn")
i = 1
For Each fld In tdf.Fields
strField = "ITM_1" & i & "_" & fld.Name
If Mid(fld.Name, 3, 1) = "P" Then Forms![frm_CreateContract].strField = "Field data"
i = i + 1
Next
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing
I am trying to update several fields on a form, the problem is this: Forms![frm_CreateContract].strField
Here is my code:
Set db = CurrentDb
Set tdf = db.TableDefs("tbl_Adendumn")
i = 1
For Each fld In tdf.Fields
strField = "ITM_1" & i & "_" & fld.Name
If Mid(fld.Name, 3, 1) = "P" Then Forms![frm_CreateContract].strField = "Field data"
i = i + 1
Next
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing