Select multiple records in the datasheet part of split form.

T

Tigerfish

Does anyone know if it's possible to work with a multiple-record selection in
the datasheet part of a split form in the same way you can using a datasheet
or continuous form? I have the need to update several records at once and
I'd like to use SelHeight and SelTop to identify the records to update. I'd
like to build on the following code to allow users to update multiple records
at once. This code works with a continuous form but now with a split form.

Function DisplaySelectedCompanyNames()
Dim i As Long
Dim F As Form
Dim RS As Recordset

' Get the form and its recordset.
Set F = Forms![TestForm]
Set RS = F.RecordsetClone

' Move to the first record in the recordset.
RS.MoveFirst

' Move to the first selected record.
RS.Move F.SelTop - 1

' Enumerate the list of selected records presenting
' the CompanyName field in a message box.
For i = 1 To F.SelHeight
MsgBox RS![CompName]
RS.MoveNext
Next i

End Function

The form in question is a split form built on a crosstab query. The form
section has a subform that displays an action record for each main record
with date assigned, user id, action and notes. I can't add an editable check
field to the datasheet part of the form, which is the part my user wants to
work with, so I'm trying to work with the selected records rectangle.

Is it possible to identify SelHeight and SelTop using a split form?

Thanks.
 

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