A
Andy Levy
Hi
I am trying to run the following query on a table (consultform), that is
already open and displaying as a continuous form.
Dim pst As ADODB.Recordset
Set pst = New ADODB.Recordset
pst.ActiveConnection = CurrentProject.Connection
pst.CursorType = adOpenDynamic
pst.LockType = adLockOptimistic
'THE QUERY
pst.Open "UPDATE master SET filter = '0' WHERE filter = '-1' "
but each time i run the code i get the following
'operation not allowed when object closed'
is it bcos the recordset is already open? is there a way round it ?
thanks
AL
I am trying to run the following query on a table (consultform), that is
already open and displaying as a continuous form.
Dim pst As ADODB.Recordset
Set pst = New ADODB.Recordset
pst.ActiveConnection = CurrentProject.Connection
pst.CursorType = adOpenDynamic
pst.LockType = adLockOptimistic
'THE QUERY
pst.Open "UPDATE master SET filter = '0' WHERE filter = '-1' "
but each time i run the code i get the following
'operation not allowed when object closed'
is it bcos the recordset is already open? is there a way round it ?
thanks
AL