Expanding dialog

J

John

Hi

I need to implement a dialog that expands to show more options with the
press of a button like the Windows Colour Picker. How can I implement this
in access? The form does not want to reduce width if it has controls in that
area. How do I overcome this?

Thanks

Regards
 
A

Albert D.Kallal

If you have a "set" of controls that you need to hide/show, to reduce
coding, I would use a sub-form.

To expand/contract the form..simply set the forms width (or height depending
on which way you wan to expand) in code....

eg:

Me.InsideWidth = lngFormWidth + (1440 * 4)

or

Me.Width = lngFormWidth + (1440 * 4)

The above would increase the form width by 4 inches. You then turn on the
controls (or my suggested idea of a sub-form)....
 
A

Albert D.Kallal

By the way, it is consider very bad to include attachments in this
newsgroup.

You can imagine the FLOOD of databases, .exe files..and tons of viruses that
would appear.

Not only would this slow down load times of messages significantly..it would
open the door to very nasty virus and all kinds of junk....

So, most people will NOT open your message, or read it if you have an
attachment.....
 
J

John

Hi

I have used the below code to expand/contract form. The controls
appear/disappear but the width remains unchanged. What am I missing?

Thanks

Private Sub btnClose_Click()
Me.btnOpen.SetFocus

Me.btnClose.Visible = False
Me.Label7.Visible = False
Me.JobRequests.Visible = False

Me.Width = 6.376
End Sub

Private Sub btnOpen_Click()
Me.Width = 12.672

Me.btnClose.Visible = True
Me.Label7.Visible = True
Me.JobRequests.Visible = True
End Sub
 
A

Albert D.Kallal

Try using

me.InsideWidth

I am not 100% sure..but if you don't re-size the actual form width..it will
not expand....
Just changing the me.width does not change the size when viewing until the
NEXT time you open the form.

The actually gray area of the form will not expand unless you use
me.InsideWidth....

So...use that.....
 
J

John

Thanks That worked.

Any way to check when the form has expanded beyond the right edge of the
screen and then move it left accordingly to fit back in the screen?

Thanks

Regards
 
A

Albert D.Kallal

John said:
Thanks That worked.

Any way to check when the form has expanded beyond the right edge of the
screen and then move it left accordingly to fit back in the screen?

Thanks

I don;t know the answer...I would suggest you start a new question on the
above. There is some real smarties that frequent this newsgroup..and they
might have a answer for you.....
 
R

Ron2005

docmd.movesize lets you change the location and size.

The non-technical way is find out what is the max size for a 600x800
monitor and control you moves based on that. Once it hits the side you
may just have to go to maximize so that the scroll bars will show after
that.
 
Top