how sort a subform (within transaction)

P

Phil Freihofner

Hi -

Using a method in Litwin's Access Developer's Handbook, I
am able to enclose operations on a form and subform within
a single transaction. (Access 2000, Vol.1, pg.
578 "Subforms and Transactions")

When the user edits records on the subform, if they change
the value of the "Day" field (contains integers relative
to Day 0, date of a transplant operation), we would like
the record to move to the correct sort position (sorted
on "Day" field).

Before I had encapsulated the operation in a transaction,
it was simple enough to do a requery within the subform:

Sub Day_AfterUpdate()
Me.Requery
End Sub

Now, however, the Me.Requery line creates an
error "Operation not supported in transactions."

The subform's recordset property is assigned a recordset
created in the parent form's Form_Load.

If you need more information to answer this question, I'm
more than happy to do what I can to help get at the best
solution.

My best guess at this late hour is that I'm going to have
to do some sort of bubble sort of the data within the
recordset itself. Yeech.

(If so, how does one identify the number of fields in a
recordset? Or I guess I can use a For Each Fld...)

Many, many thanks in advance.

Phil Freihofner
 

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