Displaying records in a subform

I hope that I say this correctly..

I have 27 records in my subform...how do I make the detail window bigger to display all 27 records?  In form view I see only about five records  and I have to use the scroll bar to see the rest.
Jass SainiAsked:
Who is Participating?
 
PatHartmanCommented:
You can control the initial size of the form by stretching it in design view and saving it that way.  The other thing I do is to use subforms in datasheet view on unbound forms.  This gives me the DS view which users like because it reminds them of Excel but it also gives me a place to put headers and buttons.  In the resize event of the MAIN form, you can place the following code which will resize the subform when the main form is resized.  You will need to change "sfrmClient" to the name of your subform control.  You will also probably have to futz with the TopBottomPadding numbers.  The size you need will depend on how large a header and how large a footer the main form is using.  Just play with it until it looks the way you want it to.

Private Sub Form_Resize()
    Const LeftRightPadding = (0.125 + 0.25) * 1440
    Const TopBottomPadding = (0.65 + 0.375) * 1440
    
    Me.sfrmClient.Height = Me.InsideHeight - TopBottomPadding
    Me.sfrmClient.Width = Me.InsideWidth - LeftRightPadding
End Sub

Open in new window

0
 
Jeffrey CoachmanMIS LiasonCommented:
Will it *always* have only 27 records to display?

What if it will contain 50, or even 100?
At some point you will be limited to the available screen real estate.
Scrolling was designed to let you see *any* amount of records, without having to dynamically change the size of the form.
Scrolling is fairly standard UI feature.

Is here a specific issue with scrolling?

JeffCoachman
0
 
Jass SainiAuthor Commented:
Yes it will always display 27 records for the filters I have set and Scrolling is fine, but my boss wants to be able to display as many of the 27 records as possible.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
PatHartmanCommented:
Did you try my suggestion?
0
 
Jeffrey CoachmanMIS LiasonCommented:
Yes it will always display 27 records
Thanks
...Then please continue on with Pat's suggestion..
0
 
Sherif TayseerCommented:
Please i need to know how to make subform showing all the duplicate values i mean that i have a table first colum is " Ref " i need when i insert the ref no at the main form i need subform to show all the duplicate records for that no if i entered it before for five times for example to see five records in the subform when i enter the ref no at the main form ?

please i need help it's very critical for my project as i need subform to work like a history for the ref no
0
 
PatHartmanCommented:
Sherif,
Please post your question in a new thread so people will see it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.