I posted this earlier as a failure to update. Actually it does UPDATE the field in Access but it generates an error message.
Global Adodc1 As Object
Public Sub PokeAccess()
frmSqlTest.Adodc1.CommandType = adCmdUnknown
frmSqlTest.Adodc1.RecordSource = "UPDATE Test1 SET Test1.Number=1234 WHERE ID=3"
frmSqlTest.Adodc1.Refresh 'Stops execution here
frmSqlTest.Adodc1.RecordSource = "SELECT Number FROM Test1 WHERE ID=3"
frmSqlTest.Adodc1.Refresh
The code runs and it does update the record in Access but it stops execution and gives me the error mesage "operation not allowed when object is closed". Oddly it does not give that message on the SELECT operation.
How do I Open the object or otherwise avoid the error message?
Global Adodc1 As Object
Public Sub PokeAccess()
frmSqlTest.Adodc1.CommandType = adCmdUnknown
frmSqlTest.Adodc1.RecordSource = "UPDATE Test1 SET Test1.Number=1234 WHERE ID=3"
frmSqlTest.Adodc1.Refresh 'Stops execution here
frmSqlTest.Adodc1.RecordSource = "SELECT Number FROM Test1 WHERE ID=3"
frmSqlTest.Adodc1.Refresh
The code runs and it does update the record in Access but it stops execution and gives me the error mesage "operation not allowed when object is closed". Oddly it does not give that message on the SELECT operation.
How do I Open the object or otherwise avoid the error message?