View Full Version : Pop-Up Forms


Little_Man22
10-26-2001, 05:48 PM
Hi,

I have 2 questions with regard to a pop-up from that I have:

a) How can I adjust the width of the form when it pops-up? It's popping up at a width that is too large for my purposes and I need to change this setting somehow.

b) When the form pops-up the fields are still filled in from the last time it ran. How can I get it so that all the fields are blank (or reset to their defualt values) each time the form pops-up?

Thanks,
Ryan.

Little_Man22
10-27-2001, 08:30 AM
I figured out for b) that I just have to change the 'data entry' under properties to 'yes'...any ideas on a) though?

scottfarcus
10-27-2001, 08:45 AM
In the on open event of the form, use

DoCmd.MoveSize 1000 (right),1000 (down),1000 (width),1000 (height)

The last two numbers will size the form.

The first two will move the form a certain distance from the left and top of the screen.

You can use the Auto Center property of the Pop Up form and then leave the first to parameters blank like

DoCmd.MoveSize , , 1000, 1000

Little_Man22
10-27-2001, 09:30 AM
Thanks ScottFarcus http://www.access-programmers.co.uk/ubb/smile.gif

ListO
10-28-2001, 08:30 PM
Scottfarcus's solution is very correct and very accurate. What some of us seat-of-the-pants writers do is to un-maximize the design window for the form, manually place and size the form window, and save the form. This sets its' default to the last one saved, but you have to fool around with it a bit, since the scroll bars and headers, etc. disappear when you actually run the form. Try it and you'll see what I mean.


DoCmd.GoToRecord , , acNewRec