Full Version: removing scroll bars
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
tra1a
Is there a way to set the size of a continuous form and remove the scroll bars? Perhaps too, limiting the number of continuous entries?
doctor9
The Scroll Bars property can be altered in the Properties box (Format tab) while the form is in Design View. Set it to Neither.

Here is some code I use on a continuous subform's On Current event. I think it ought to work for a continuous main form as well.
CODE
  
Private Sub Form_Current()

    Dim rst As Object

'   This makes an exact copy of the current form's recordset
    Set rst = Me.RecordsetClone

'   This checks the number of records on this form
    If rst.RecordCount >= 6 Then
'       Don't let them add more records
        Me.AllowAdditions = False
    Else
'       Let them add records again
        Me.AllowAdditions = True
    End If

End Sub

Not sure how elegant it is, but it allows my users to have a maximum of 6 records. If they have six, they can delete one, which re-enables the ability to add a new record.

Hope this helps,

Dennis
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.