F
Fred Wilson
The following code is used to maximize my opening form. Additionally I
have an "enter" button to enter the main application. I would like this
button to be approximately .25 inches from the bottom and from the right
of the maximized form.
The LEFT property of the imgEnter control function alright. It gets it
in the correct spot, about .25 inches from the right side of the form.
The TOP property is causing the Run time error 2100
"The control or subform control is too large for this location."
Private Sub Form_Current()
Dim intButtWidth As Variant
Dim intFormWidth As Variant
Dim intButtHeight As Variant
Dim intFormHeight As Variant
Dim intLeft As Variant
Dim intTop As Variant
DoCmd.Maximize
intFormWidth = Forms.Item(Me.Name).WindowWidth
intFormHeight = Forms.Item(Me.Name).WindowHeight
intButtWidth = Me.imgEnter.Width
intButtHeight = Me.imgEnter.Height
intLeft = intFormWidth - (intButtWidth + 360) 'plus 360 twips is approx
..25 inches
intTop = intFormHeight - (intButtHeight + 360) 'plus 360 twips is
approx .25 inches
Me.imgEnter.Left = intLeft
Me.imgEnter.Top = intTop <<< THIS LINE IS ERRORING OUT.
End Sub
have an "enter" button to enter the main application. I would like this
button to be approximately .25 inches from the bottom and from the right
of the maximized form.
The LEFT property of the imgEnter control function alright. It gets it
in the correct spot, about .25 inches from the right side of the form.
The TOP property is causing the Run time error 2100
"The control or subform control is too large for this location."
Private Sub Form_Current()
Dim intButtWidth As Variant
Dim intFormWidth As Variant
Dim intButtHeight As Variant
Dim intFormHeight As Variant
Dim intLeft As Variant
Dim intTop As Variant
DoCmd.Maximize
intFormWidth = Forms.Item(Me.Name).WindowWidth
intFormHeight = Forms.Item(Me.Name).WindowHeight
intButtWidth = Me.imgEnter.Width
intButtHeight = Me.imgEnter.Height
intLeft = intFormWidth - (intButtWidth + 360) 'plus 360 twips is approx
..25 inches
intTop = intFormHeight - (intButtHeight + 360) 'plus 360 twips is
approx .25 inches
Me.imgEnter.Left = intLeft
Me.imgEnter.Top = intTop <<< THIS LINE IS ERRORING OUT.
End Sub