Rebinding ADO recrdset to form fails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform which is bound to an ADO recordset (pulled from SQL 2000). The form has some dropdowns which the after update event triggers the same code but using the actual value in the SQL statement as opposed to wildcards. The SQL pulls back a recordset but when it comes to the statement

set form_booking.recordset = rs

it fails this time. The same code works the first time round?

The errors I get are "recordset is not updateable" or "cannot find column recordset" or "the object doesn't contain the automation object recordset" or "method recordset of object Form_Booking failed

Any ideas

Thank

Ian
 
your variable rs should be weather a table name or an Sql query that can be
updated by access
if you have second option, you can make sure, by creating a query object in
access and Past your Sql statement
if you can't update the fields in when you execute your query, you'll need
to simplify your query
hope it helps


Ian said:
I have a subform which is bound to an ADO recordset (pulled from SQL
2000). The form has some dropdowns which the after update event triggers
the same code but using the actual value in the SQL statement as opposed to
wildcards. The SQL pulls back a recordset but when it comes to the
statement:
set form_booking.recordset = rs

it fails this time. The same code works the first time round?!

The errors I get are "recordset is not updateable" or "cannot find column
recordset" or "the object doesn't contain the automation object recordset"
or "method recordset of object Form_Booking failed"
 
Warrio

thanks for the reply - it wasn't an issue with the query as it was returning the recordset correctly both times. The issue was in the rebinding of data. I have since recreated the subform from scratch and cut and pasted the code in and it works now. Must have been some form of corruption in Access

Regard

Ia
 
Back
Top