Solved

Resize a form opened with acDialog

Posted on 2003-12-11
5
1,519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

690 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