J
Julia Boswell
Hi all,
I'm using a form after update event to run a make table query, which works
fine. However then I need the code to append a field to the new table. I'm
using ADO in Access 2003. Here's the code:
Dim db As ADODB.Connection
Dim rsTemp As New ADODB.Recordset
'open the new temporary table and add a new field
Set db = CurrentProject.Connection
rsTemp.Open "tblTempDespbyIL", db, adOpenKeyset, adLockOptimistic,
adCmdTableDirect
rsTemp.Fields.Append "Despatch", adBoolean, , adFldUpdatable
When it comes to the last line of the code I get a run-time error 3219
"Operation is not allowed in this context".
Anyone any ideas?
Thanks
Julia
I'm using a form after update event to run a make table query, which works
fine. However then I need the code to append a field to the new table. I'm
using ADO in Access 2003. Here's the code:
Dim db As ADODB.Connection
Dim rsTemp As New ADODB.Recordset
'open the new temporary table and add a new field
Set db = CurrentProject.Connection
rsTemp.Open "tblTempDespbyIL", db, adOpenKeyset, adLockOptimistic,
adCmdTableDirect
rsTemp.Fields.Append "Despatch", adBoolean, , adFldUpdatable
When it comes to the last line of the code I get a run-time error 3219
"Operation is not allowed in this context".
Anyone any ideas?
Thanks
Julia