subform resize???

S

SuzyQ

I want to resize the width of the subform when the form is resized. I put
the code below in my project, but it is not working. Can someone help me
resize my subform on the fly?

Private Sub Form_Resize()
Me.frmInvoiceLineItemsListSubform.Width = Me.Width - (0.25 * 1440)
End Sub
 
J

Jeanette Cunningham

Hi SuzyQ,
you need to resize the subform control and probably also the subform inside
the subform control.
The easiest way I have found to get this to work, is to give the subform
control a colored border, manually change the size and switch to form view
to see what happens. The bright colored border makes it easier to see what
is happening. Once you have got it worked out, you can set up the code to
make it happen on the fly and remove the bright colored border.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
S

SuzyQ

Do you have a sample of code for one that you've got to work? I'll see if I
can do what you're saying, but not sure why code below isn't working.
 
G

Graham Mandeno

Hi Suzy

Me.Width does not change as you resize a form. Use Me.InsideWidth instead.
 
S

SuzyQ

that did it. thanks

Graham Mandeno said:
Hi Suzy

Me.Width does not change as you resize a form. Use Me.InsideWidth instead.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

SuzyQ said:
I want to resize the width of the subform when the form is resized. I put
the code below in my project, but it is not working. Can someone help me
resize my subform on the fly?

Private Sub Form_Resize()
Me.frmInvoiceLineItemsListSubform.Width = Me.Width - (0.25 * 1440)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top