Solved

Resize a form opened with acDialog

Posted on 2003-12-11
5
1,457 Views
Last Modified: 2008-02-01
Hi Experts,

This sounds simple but how's it done?
How do I resize a form opened in code with
DoCmd.OpenForm "Formname", , , , , acDialog

I have a formFooter that's invisible.
Iwant to press a button on the form & make the footer visible + resize.

I have to use acDialog.




0
Comment
Question by:tbsgadi
  • 2
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
rvooijs earned 500 total points
ID: 9919319
Hi,

I think this code might work for you ...

Private Sub Command0_Click()

    Me.Detail.Height = Me.Detail.Height * 1.1
    Me.lblFooter.Top = Me.Detail.Height - Me.lblFooter.Height - 10
    Me.lblFooter.Visible = True
   
    RunCommand acCmdSizeToFitForm

End Sub

If it doesn't , just let me know.

Robert
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 9919509
Hi tbsgadi,

Create a new button on the form and add some code like this:

Private Sub Command0_Click()
    On Error Resume Next
    Me.FormFooter.Visible = True
    RunCommand acCmdSizeToFitForm
End Sub

Alan :)
0
 
LVL 46

Author Comment

by:tbsgadi
ID: 9919527
Thanks ..all I needed was the
  DoCmd.RunCommand acCmdSizeToFitForm

Sorry Alan Robert said it first!
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 9919548
Thats OK, glad you got it working!

How about making it a toggle button

    On Error Resume Next
    ' toggle show/hide footer
    Me.FormFooter.Visible = Not Me.FormFooter.Visible
    RunCommand acCmdSizeToFitForm

Alan :)
0
 
LVL 46

Author Comment

by:tbsgadi
ID: 9919608
Thanks for you suggestion Alan,but it's only one way.
I press the button after Stage one & move to Stage 2
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now