Vertical Scrollbars in a subform

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

I am having trouble viewing vertical scrollbars in one of
my subforms. I have created an event procedure within On
Current.

' If the number of records in the subform
' is greater than 4, display the
' horizontal and vertical scrollbars.
If Me.RecordsetClone.RecordCount > 4 Then
Me.ScrollBars = 2
Else
Me.ScrollBars = 0
End If

It doesn't seem to take...ideas?

Thanks.

Max
 
I am having trouble viewing vertical scrollbars in one of
my subforms. I have created an event procedure within On
Current.

' If the number of records in the subform
' is greater than 4, display the
' horizontal and vertical scrollbars.
If Me.RecordsetClone.RecordCount > 4 Then
Me.ScrollBars = 2
Else
Me.ScrollBars = 0
End If

It doesn't seem to take...ideas?

Thanks.

Max
The RecordCount is only accurate when you do a MoveLast.

Me.RecordsetClone.MoveLast
If Me.RecordsetClone.RecordCount > 4 Then
Me.ScrollBars = 2
Else
Me.ScrollBars = 0
End If

However, there will be a performance hit with MoveLast.
Test and decide for yourself.

- Jim
 
Hmmm, that shouldn't cause a problem. Where is the error occuring?
what is the message and number?

Also, try putting a break in code just prior to the code in question
and stepping through it.

- Jim
 
Back
Top