Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I change an existing form's properties?

Status
Not open for further replies.

dc1688

MIS
Oct 25, 2001
2
US
Hi, I need help on how to change an existing form's properties while running VB codes. I need to be able to manipulate the form's size because it is subject to change depending on the data in the tables. Thanks in advance. Really appreciate the help.
 
To change the form's size of an existing form, you will need to be in designview. The way I have done it in code was something like:
Code:
dim frm as Form
set frm=Forms!MyForm

with frm
  docmd.open .name,,,acHidden
  .width=ANumber
  .height=AnotherNumber
end with

Docmd.close acform,.name,acsave
set frm=nothing
docmd.open acform,Forms!MyForm

I don't know if this is the best way, but accept for the annoying flickering, it works well.

Hope this Helps,
Rewdee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top