Moving multiple controls to the right or left a specified distance

G

gr22

Hi,

I'm a novice at Access and have a simple question: Is there a way to move
multiple controls - say 10 labels or text boxes - to the right by 0.3" on an
Access report? For example, I need to insert a new column in the middle of a
tightly packed report. I tried turning off snap to Grid and dragging the
controls, but I still needed adjust the Left Property on each control to get
them precisely where I needed them. Thanks.
 
D

Duane Hookom

You can select multiple controls and then hold down the Ctrl key while
tapping the Left Arrow key.
 
G

gr22

Thanks Duane, but I'm trying to get the left property of each control to move
to an exact location. So in my example, control1's left property is .4583 and
I want to set it to .7583; control2's left property is .8583 and I want to
set it to 1.1583. Tapping the left arrow key while holding Ctrl down didn't
seem to be that precise, but maybe it is something I'm doing incorrectly.
 
D

Duane Hookom

I suppose you could write some code that could be run with the report open in
design view. I would probably select all of the controls to move and set
their Tag properties to "MoveMe". The code would loop through all of the
controls on the report and check the Tag property. If it equals "MoveMe",
then set the Left property of the control to the Left property + (0.3 * 1440).

You would then need to save the report or it would revert back to the
previous property values.
 

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