Need to edge out the competition for your dream job? Train for certifications today.
Dim sngOrigButtonTop as single
Dim sngOrigSubFormTop as single
Dim sngOrigSubformHeight as single
'Replace the 3.5, 3.8, and 3.0 in the next three lines with the original values for the controls on the form, before you make changes
sngOrigButtonTop = 3.5 * 1440
sngOrigSubformTop = 3.8 * 1440
sngOrigSubformHeight = 3.0 *1440
on error goto ProcError
if me.cmd_Resize.Caption = "Increase" then
'Replace the 1.0 and 1.3 in the following code with the positions where you want the top of the button
'and the top of the subform when they are expanded.
me.cmd_Resize.Caption = "Decrease"
me.cmd_Resize.Top = 1 * 1440 '(1" = 1440 twips)
me.subformControlName.Top = 1.3 * 1440
me.subformControlName.Height = sngOrigSubformTop - (1.3 * 1440) + sngOrigSubformHeight
me.cmd_Resize.Caption = "Increase"
me.subformControlName.Height = sngOrigSubformHeight
me.subformControlname.Top = sngOrigSubformTop
me.cmd_Resize.Top = sngButtonTop
debug.print "cmd_Resize_Click", err.number, err.description
msgbox err.number & err.description, , "cmd_Resize_Click
Open in new window
Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.