Solved

Resize a form opened with acDialog

Posted on 2003-12-11
5
1,440 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks ..all I needed was the
  DoCmd.RunCommand acCmdSizeToFitForm

Sorry Alan Robert said it first!
0
 
LVL 26

Expert Comment

by:Alan Warren
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

743 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

13 Experts available now in Live!

Get 1:1 Help Now