Resize Sub Form With An Event

wizcow

Registered User.
Local time
Today, 07:09
Joined
Sep 22, 2001
Messages
236
Hi

When a certain person is selected from a SalesPerson combobox
on the main form, I want the subform to enlarge.

I have tried using an If statement on the afterupdate of the combobox but it doesn't work.

Private Sub SalesPerson_AfterUpdate()

If SalesPerson = 2 Then
InvoiceSub.top=1.8
End If


End Sub

Help
Tom
 
Hi Wizcow, my english is not very well, but I hope you understand me.
You have to build a module called Resize (for instance)
and writte the follow code:

Funtion Resize (frm As Form, ctl As Control)
Dim intAjuste As Integer
On Error Resume Next
intAjuste=frmSection(acHeader).Height*frm Section(acHeader).visible
inAjuste=intAjuste+frm Section(acFooter).Height*frmSection(acFooter).Visible
On Error GoTo 0
intAjuste=Abs(intAjuste)+ctl.Top
if intAjuste<frm.InsideHeight Then
ctl.Height=frm.InsideHeight-intAjuste
End If
End Funtion

on event "ON CHANGE SIZE" WRITTE =Redimensionar([Form];[Sales])

I Hope when change the size of your form, the subform change too.
I Hoppe it work please tell it me
 
Paco

Thanks! I will give it a try.

Tom
 

Users who are viewing this thread

Back
Top Bottom