Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SelHeight = 0 in Continuouss Form(?)

Status
Not open for further replies.

dgriffin

Programmer
May 26, 2001
50
US
I have a continuous form (not a subform) with a table as the record source. The record selector buttons are turned on. And even though the Access Help file says "The SelHeight property. A Long Integer value between 0 and the number of records in the datasheet or continuous form.", the following code fails.

In debug I have verified that the reason it fails is because the SelHeight property is zero in spite of the fact that numerous records are selected. The SelTop property is indeed set to the first record selected as you would expect.

Any suggestions as to why the SelHeight property is zero?

==============================
Private Sub SelectButton_Click()
Dim rst As Recordset, i As Integer

If Me.SelTop > 0 Then
Set rst = Me.RecordsetClone
rst.MoveFirst
rst.Move Me.SelTop
i = 0
Do While i < Me.SelHeight
rst.Edit
rst!X = Not rst!X
rst.Update
rst.MoveNext
i = i + 1
Loop
rst.Close
End If

End Sub
==============================

Thanks,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top