In Access 2000 I need to add a new record to a recordset. However I need to build the field name via code, so my code looks like this:
Dim txtField as string
Dim Kount as integer
Do Until .EOF
txtField = "Container" & Kount & "Id"
rstQuotationProductContainer
.AddNew
!ProductId = intProductId
!txtField = intContainerId
.Update
Access does not like the txtField in !txtField = intContainerId
What should the syntax be?
Dim txtField as string
Dim Kount as integer
Do Until .EOF
txtField = "Container" & Kount & "Id"
rstQuotationProductContainer
.AddNew
!ProductId = intProductId
!txtField = intContainerId
.Update
Access does not like the txtField in !txtField = intContainerId
What should the syntax be?