Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Opening Position


Message #1 by "Andrew Payne" <andrewpayne.plastics@b...> on Mon, 18 Mar 2002 16:23:26
I have a form with a command button that when clicked opens another form.  
I need the second form to open in a specific area (just in from the bottom 
right of the first form).  Does anyone know how I can control where the 
form opens to?

Thanks Andrew

 
Message #2 by PStreeter@C... on Mon, 18 Mar 2002 10:30:52 CST
On Mon, 18 Mar 2002 16:23:26 "Andrew Payne" wrote:

> I have a form with a command button that when clicked opens another
> form.   I need the second form to open in a specific area (just in from the
> bottom right of the first form).  Does anyone know how I can control
where the 
> form opens to?
> 
> Thanks Andrew
> 
Open it with the button from the first form. Regress to 
design view. Move it where you want it with the size 
you want and save it.

Paul


Message #3 by "John Ruff" <papparuff@c...> on Tue, 19 Mar 2002 07:42:54 -0800
This is a multi-part message in MIME format.

------=_NextPart_000_0097_01C1CF19.AF5DB2D0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

In the form's open event place the following code:

    FormMoveSizeInches_TSB Me.Name, 5, 7.75, 3, 2.5

In a module place the following code:

Public Sub FormMoveSizeInches_TSB(strForm As String, varTop As Variant,
_
                varLeft As Variant, varWidth As Variant, varHeight As
Variant)
' Comments  : moves and/or resizes the named form in units of inches
' Parameters: strForm - the name of the form
'             intTop - top position of form
'             intLeft - left position of form
'             intWidth - width of form
'             intHeight - height of form
' Returns   : True if successful, False otherwise
'
    Const TwipsPerInch = 1440

    On Error GoTo PROC_ERR
   
    DoCmd.SelectObject acForm, strForm, False
   
    DoCmd.MoveSize varLeft * TwipsPerInch, varTop * TwipsPerInch,
varWidth * TwipsPerInch, varHeight * TwipsPerInch
   
PROC_EXIT:
      Exit Sub
   
PROC_ERR:
      MsgBox Err.Description
      Resume PROC_EXIT
   
End Sub


(The code comes from FMS Inc.'s Sourcebook. www.fmsinc.com)

John Ruff - The Eternal Optimist J

Always looking for Contract Opportunities

 

9306 Farwest Dr SW

Lakewood, WA 98498

papparuff@c...




-----Original Message-----
From: Andrew Payne [mailto:andrewpayne.plastics@b...]
Sent: Monday, March 18, 2002 4:23 PM
To: Access
Subject: [access] Opening Position


I have a form with a command button that when clicked opens another
form. 
I need the second form to open in a specific area (just in from the
bottom
right of the first form).  Does anyone know how I can control where the
form opens to?

Thanks Andrew







  Return to Index