Tweaking report layouts after setting items to invisible

Caffeine_demon

New member
Local time
Today, 22:34
Joined
Apr 24, 2013
Messages
6
Hi,

I have a form, where a table has a number of check boxes, which when ticked, display a prompt below for extra information. I've turned the text box beneath on and off in a macro when the checkbox is unticked, But I was wondering if there's any way of moving the rest of the form up a bit when unticked, so we don't have the blank space - I've attached a zip file with "from" and "to" versions so you can see what I'm trying to do.

Many thanks
 

Attachments

It can be done, but you have to calculate/set a new top position for each control beneath the control you make invisible.

I've attached a small example for you, open the form "ControlMove".
 

Attachments

Thanks, But it doesn't seem to want to load for me! just says "unrecognised database format"?

Have tried in access 2007 and 2003..:banghead:
 
Ok - now I've made a MDB database file for you.
Else create a form, add 2 text controls, call them "ControlToMove" and "ControlToMove1" (lable names, look in the code). Add 2 bottons to the form, call them "Move_Up" and "Move_Down".
Place the below code in the click-event for the bottons.
Code:
Private Sub Move_Down_Click()
  Me.ControlToMove.Top = Me.ControlToMove.Top + 100
  Me.ControlToMoveEtiket.Top = Me.ControlToMove.Top
  Me.ControlToMove1.Top = Me.ControlToMove1.Top + 100
  Me.ControlToMoveEtiket1.Top = Me.ControlToMove1.Top
End Sub

Private Sub Move_Up_Click()
  Me.ControlToMove.Top = Me.ControlToMove.Top - 100
  Me.ControlToMoveEtiket.Top = Me.ControlToMove.Top
  Me.ControlToMove1.Top = Me.ControlToMove1.Top - 100
  Me.ControlToMoveEtiket1.Top = Me.ControlToMove1.Top
End Sub
 

Attachments

Users who are viewing this thread

Back
Top Bottom