Problems with Bound ADO Form

M

Malcolm

I've been struggling with bound forms for a few days and
have found two very weird problems using Access XP and SQL
2000.

One form behaves like it was bound to a normal linked
table until I click a checkbox. As soon as that happens,
I can't leave the record. I'm just stuck until the form
is reloaded.

On the other one, I'm running a routine that updates
fields in the recordset. The changes show on the form but
they don't save in the actual table (they are lost when
the form is reloaded).

I'm sure both of these problems must be due to the way I
am probably setting the recordsets for the forms (these
are both unbound subforms). I'm behind the ADO curve

dim rst as New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.Open "SELECT *...",
MyConnectionStringToSql,adOpenKeyset, adLockOptimistic
Set myform.Recordset = rst
myform.UniqueTable = "MyTable"
Set rst.ActiveConnection=Nothing
Set rst=Nothing

The one that does not save the updates has a join.

dim rst as New ADODB.Recordset
set rst = mysubform.Recordset.Clone
!Field1="This"
!Field2="That"
..Update

I can see the values in the fields in the debugger and on
the form but they never make it to the table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top