D
David S. Calef
I am using a table called GLAccount that consists of name, acct, date, amt
I am trying to use the field "name" contents as the name of a field to
gather data from the active form. I cannot find the correct syntax for
brackets, quotes, parantheses, etc to make it work: See my use of the
varialble ITEMSEL
Private Sub cmdLink_Click()
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open "Select * from GLAccounts"
Do Until rst.EOF
ITEMSEL = rst![Name]
rst![Amt] = Nz(me![ITEMSEL])
rst.MoveNext
Loop
End Sub
Thanks,
David
I am trying to use the field "name" contents as the name of a field to
gather data from the active form. I cannot find the correct syntax for
brackets, quotes, parantheses, etc to make it work: See my use of the
varialble ITEMSEL
Private Sub cmdLink_Click()
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open "Select * from GLAccounts"
Do Until rst.EOF
ITEMSEL = rst![Name]
rst![Amt] = Nz(me![ITEMSEL])
rst.MoveNext
Loop
End Sub
Thanks,
David