By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,669 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,669 IT Pros & Developers. It's quick & easy.

Resizing the Window of a Form

P: 3
I am trying to set the windows size of a form when it opens. It is a continuous form and on autoresize it ends up only showing one record at a time. I want to have no border. When it opens, if i had set it to have a sizeable border, I can resize and it will show more than one record. I plan on counting the records in the form and having the height change based off of that, up to a certain size. I have tried turning off autoresize and under the on open event using acCmdSizeToFitForm, but no luck. Any help is greatly appreciated, thanks.
May 17 '07 #1
Share this Question
Share on Google+
2 Replies

MSeda
Expert 100+
P: 159
in the on open event set the form's insideheight to the the height of the detail multiplied by your record count plus any header or footer height.

the statement will look more or less like this
Expand|Select|Wrap|Line Numbers
  1. dim reccnt as integer
  2. dim dethi as integer
  3.  
  4. dethi =320
  5. rccnt = ???
  6.  
  7. me.form.insideheight = dethi*reccnt + me.formheader.height + me. formfooter.height
  8.  
  9.  
you'll need to flesh it out by setting the record count variable, you can use an if statement to limit the size.
This should get you started, see where it takes you and post back
May 17 '07 #2

P: 3
Thanks a lot, its working now.

in the on open event set the form's insideheight to the the height of the detail multiplied by your record count plus any header or footer height.

the statement will look more or less like this
Expand|Select|Wrap|Line Numbers
  1. dim reccnt as integer
  2. dim dethi as integer
  3.  
  4. dethi =320
  5. rccnt = ???
  6.  
  7. me.form.insideheight = dethi*reccnt + me.formheader.height + me. formfooter.height
  8.  
  9.  
you'll need to flesh it out by setting the record count variable, you can use an if statement to limit the size.
This should get you started, see where it takes you and post back
May 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.