Defining vertical lines on my report that Grow/Shrink (More)

G

Guest

I followed your suggestion and have successfully defined VBA code to draw a
vertical line that Grows/Shrinks (Thank you! ). Now I would like to modify
that VBA code to avoid having to hardcode the x coordinate and instead
dynamically define the x coordinate using the left property value of a
control to the left of which I'm drawing the line. I want to avoid having to
change the VBA code everytime I change the position of a control on the
report.
 
G

Guest

Thanks for your response - my problem is that I'm evidentally not defining
the left property correctly.
My original code is: Me.Line (1.5 * 1440, 0)-(1.5 * 1440, Me.Height) where
1.5 is the left property of a control named 'desc'. My report is named 'cmed'.
What exactly do I have to substitute for the 1.5 to reference the left
property. I know it's probably a simple answer, but it's not clear to me. :)
 
D

Duane Hookom

Assuming you have a control named "X" that you want to draw your line at the
same left position:
Me.Line (Me.X.Left, 0)-(Me.X.Left, Me.Height)
 
G

Guest

Thanks for your response.

I had tried that and it didn't work, but I just realized that I was using
the 'Control Source' and not the 'Name' which was different.

This is so cool! I have almost 60 controls and now I won't have to
re-hardcode the x coordinate every time I change the position of the controls
- Thanks again!
 

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