Change Top property for TextBox in report

A

accesshacker

Hello,
I am trying to reposition Textboxes if a Textbox has a null value based on a
selection from a form. Doesn't look like they move. Here is my code.

Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
Dim a As Variant
a = Forms!POC_PO_CREATE_A!POP5
If IsNull(a) Then
Me.POP3.Top = 2.9688
Me.POP4.Top = 3.2708
Me.POP5.Top = 3.5729

End If

End Sub

Want to move POP3 to where POP5 was and POP4 to where POP3 was and finally
POP5 to where POP4 was. When I go to 'View', none have moved. In Print
Preview, all 3 are gone.

Not sure what I am doing wrong. Thanks in advance for any insights!
 
J

John Spencer

First of all try multiplying by 1440 (twips) if you are working in inches.
Right now you are probably stacking the controls almost on top of each other
and probably under some other existing control. The top of all three controls
is probably at 3/1440 inches about 0.0021 inches.

Second, are all those controls in the GroupHeader3 section?

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
A

accesshacker

All the controls are in GroupHeader3 Section. Also, the 2.9688 position is
what I am pulling from the property sheet for each control. Do I multiple
that by 1440?

Thanks!
 
A

accesshacker

John,

Went ahead and multiplied the figures by 1440 and it is working perfectly
now. Thanks so much! I had forgotten what twips represented from way back in
2.0
 

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

Top