?
Solved

Resize a form opened with acDialog

Posted on 2003-12-11
5
Medium Priority
?
1,632 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

809 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