A
Andy Levy
Im getting "Error 3219: Operation Not Allowed In This Context" when
running the following code which feeds particular values from one table into
another. Does anyone know how i can resolve it. Thanks
Dim pst As ADODB.Recordset
Set pst = New ADODB.Recordset
pst.Open "SELECT * FROM tblLog", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT URID,* FROM items WHERE URID =" & varPK,
CurrentProject.Connection
pst.MoveLast
Dim flda As Field
Dim fldb As Field
For Each flda In rst.Fields 'items
For Each fldb In pst.Fields 'log
If flda.name = fldb.name Then
If Not IsNull(flda.Value) Then
fldb.Value = flda.Value
End If
End If
Next fldb
Next flda
running the following code which feeds particular values from one table into
another. Does anyone know how i can resolve it. Thanks
Dim pst As ADODB.Recordset
Set pst = New ADODB.Recordset
pst.Open "SELECT * FROM tblLog", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT URID,* FROM items WHERE URID =" & varPK,
CurrentProject.Connection
pst.MoveLast
Dim flda As Field
Dim fldb As Field
For Each flda In rst.Fields 'items
For Each fldb In pst.Fields 'log
If flda.name = fldb.name Then
If Not IsNull(flda.Value) Then
fldb.Value = flda.Value
End If
End If
Next fldb
Next flda