Solved

Resize a form opened with acDialog

Posted on 2003-12-11
5
1,499 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

740 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