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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.