Popup - cont. forms height (1 Viewer)

shacket

Registered User.
Local time
Today, 19:06
Joined
Dec 19, 2000
Messages
218
What I want to do is this: have a form pop up in the center of the screen with a list (continuous forms). I want to have it show a given number of form items (i.e. the height of the detail section - how many items are shown) but I can't figure out how to tell the form to be X high or to tell it to show Y records.

Any ideas?
 

kirbott

Registered User.
Local time
Today, 19:06
Joined
Feb 15, 2000
Messages
12
In the Load event of the form include something like this:


Const HEADERHT = 1000

Private Sub Form_Load()

Dim NumOfRecordsToShow As Integer

NumOfRecordsToShow = 5
Me.InsideHeight = HEADERHT + (500 * NumOfRecordsToShow)

End Sub


HEADERHT is a constant that is the height of your form header in twips (1440 twips per inch)

NumOfRecordsToShow is the number of records you want to be displayed when the form opens. You'll have to figure out what the height of each record is in twips (in the example I have assumed it to be 500).

Hope this helps.
 

ListO

Señor Member
Local time
Today, 19:06
Joined
Feb 2, 2000
Messages
162
I've always done that in a more brute-force way; not as sure as the above, but for some of us boneheads it works:

With the form in design view, I middle-mize the design view window, and manually make the form the size I want it to be and place it on the screen where I want it to be, then click the SAVE (disk) icon. Jumping to Form View shows me how it'll look when evoked. About 30 trial-and-error attempts later, it's just the way I want it.

-Curt
 

Users who are viewing this thread

Top Bottom