I'm trying to edit a field in a record using SQL. I do this:
adoRecordset.Open "SELECT * FROM [" & StorageTable & "] WHERE '" & IndexField & "'='" & ConnectedField.Text & "'", adoConnection, adOpenKeyset, adLockOptimistic, adCmdText
adoRecordset!StorageField = File.Text '**
adoRecordset.Update
But I get a runtime error when we get to the line with '** next to it:
"ADO could not find the object in the collection corresponing to the name or ordinal reference requested by the application."
I cant work out what this error message is going on about. I debug.print the SQL string which gives this:
SELECT * FROM [Inspection 1] WHERE 'Road Name'='CLEVELAND STREET' which seems to contain the correct table, field, and record so I sume it must be something to do woth the other parameters?
Any help,
thanks
elziko
adoRecordset.Open "SELECT * FROM [" & StorageTable & "] WHERE '" & IndexField & "'='" & ConnectedField.Text & "'", adoConnection, adOpenKeyset, adLockOptimistic, adCmdText
adoRecordset!StorageField = File.Text '**
adoRecordset.Update
But I get a runtime error when we get to the line with '** next to it:
"ADO could not find the object in the collection corresponing to the name or ordinal reference requested by the application."
I cant work out what this error message is going on about. I debug.print the SQL string which gives this:
SELECT * FROM [Inspection 1] WHERE 'Road Name'='CLEVELAND STREET' which seems to contain the correct table, field, and record so I sume it must be something to do woth the other parameters?
Any help,
thanks
elziko