L
Larry
I have an Access 2002 form, which has several buttons a textbox and
listbox. Two of the buttons appear below the textbox when the form is
opened, while the listbox is invisible. If the user presses the browse
button (to the side of the textbox) and selects multiple files to
import, the listbox appears below the textbox with the selected files
and the command buttons move down below the new listbox as the form
expands.
If the user then browses to another location and selects only one file,
the listbox disappears and the command buttons move back up to be just
below the textbox. In both cases, the form size changes to be just tall
enough to show the command buttons. So it can be fairly tall (~5000
pixels) or short (~1500 pixels) depending on the listbox being
displayed or not.
There is no problem here, everything works beautifully.
BUT NOW, the user needs some options, so I am trying to put an option
group below the textbox (between the two command buttons).
Unfortunately (as many of you probably already know) when you move the
frame of an option group (using the TOP property) the entire group does
not move (like it does in design mode!), you have to move each
component of the option group (including labels) and reset the height.
I am getting this error message (2100) when I try to display the
listbox and move the option group below the box at the point I set the
frames top property. I have already moved the command buttons by this
time, so the line of code I use (on which the error occurs) is:
Me.fraStyle.Top = Me.cmdOK.Top
I have done a LOT of debugging around this and find that the forms
InsideHeight is 1545 when controls start moving. The top of the OK
button is 4050 after it moves (even though it's outside the 1545 of the
InsideHeight of the form!). The top of the frame, at this point, is
1020. Why I can't move it to be even with the top of the button at this
point, I don't understand.
All of the components of the frame (pardon me for using "frame" so much
instead of "Option Group", it's the VB programmer in me coming out)
have moved by the time the line of code to move the frames top has
executed and have had no problems. The overall height of the frame now
is 3448, because I had to make it taller (relative to the position of
the OK button) to be able to move the option buttons and such inside
it.
I even tried setting the InsideHeight, before the frame top, so that it
was big enough to hold the height of the frame below the command
button:
Me.InsideHeight = Me.cmdOK.Top + Me.cmdOK.Height + Me.fraStyle.Height +
50
This made the InsideHeight over 8600, but when the line to set the top
of the frame was executed, the error still surfaced.
So basically, this error message is useless!
Can anyone give me something else to try that I may have missed?
Thanks,
Larry
listbox. Two of the buttons appear below the textbox when the form is
opened, while the listbox is invisible. If the user presses the browse
button (to the side of the textbox) and selects multiple files to
import, the listbox appears below the textbox with the selected files
and the command buttons move down below the new listbox as the form
expands.
If the user then browses to another location and selects only one file,
the listbox disappears and the command buttons move back up to be just
below the textbox. In both cases, the form size changes to be just tall
enough to show the command buttons. So it can be fairly tall (~5000
pixels) or short (~1500 pixels) depending on the listbox being
displayed or not.
There is no problem here, everything works beautifully.
BUT NOW, the user needs some options, so I am trying to put an option
group below the textbox (between the two command buttons).
Unfortunately (as many of you probably already know) when you move the
frame of an option group (using the TOP property) the entire group does
not move (like it does in design mode!), you have to move each
component of the option group (including labels) and reset the height.
I am getting this error message (2100) when I try to display the
listbox and move the option group below the box at the point I set the
frames top property. I have already moved the command buttons by this
time, so the line of code I use (on which the error occurs) is:
Me.fraStyle.Top = Me.cmdOK.Top
I have done a LOT of debugging around this and find that the forms
InsideHeight is 1545 when controls start moving. The top of the OK
button is 4050 after it moves (even though it's outside the 1545 of the
InsideHeight of the form!). The top of the frame, at this point, is
1020. Why I can't move it to be even with the top of the button at this
point, I don't understand.
All of the components of the frame (pardon me for using "frame" so much
instead of "Option Group", it's the VB programmer in me coming out)
have moved by the time the line of code to move the frames top has
executed and have had no problems. The overall height of the frame now
is 3448, because I had to make it taller (relative to the position of
the OK button) to be able to move the option buttons and such inside
it.
I even tried setting the InsideHeight, before the frame top, so that it
was big enough to hold the height of the frame below the command
button:
Me.InsideHeight = Me.cmdOK.Top + Me.cmdOK.Height + Me.fraStyle.Height +
50
This made the InsideHeight over 8600, but when the line to set the top
of the frame was executed, the error still surfaced.
So basically, this error message is useless!
Can anyone give me something else to try that I may have missed?
Thanks,
Larry