Need a fix so I can have the code below write code
What happens:
ex. FormValue = "Me!ROW" & LoopTo8 & "Text1"
I would like the FormValue to equal Me!Row1Text1 update a record.
Then it loops and FormValue to equal Me!Row2Text1...
and to take it a step further with
rst!field1 = Me!Row1text1
then add +1
rst!field1 = Me!Row2text1
...
Any thoughs????
Private Sub RowUpdate()
Dim rst As Object: Set rst = CurrentDb.OpenRecordset("Row_Table"
Dim LoopTo18 As Variant
Dim FindID As Variant
Dim TableValue As Variant
Dim FormValue As Variant
Dim LoopValue As Variant
FindID = Me!QuoteID
LoopTo18 = 1
Do While LoopTo18 < 19
FormValue = "Me!ROW" & LoopTo18 & "Text1"
LoopValue = FormValue
If IsNull(LoopValue) Then
Else
rst.AddNew
FormValue = "Me!ROW" & LoopTo18 & "Text1"
TableValue = "rst!Row" & LoopTo18 & "_Sku"
TableValue = FormValue
FormValue = "Me!ROW" & LoopTo18 & "Text2"
TableValue = "rst!Row" & LoopTo18 & "_Des"
TableValue = FormValue
rst!Row_Number = LoopTo18 ' Row_Number
rst.Update
End If
LoopTo18 = LoopTo18 + 1
Loop
End Sub