Access 2003 label will not go to exact position on form when addingLeft and Top info in properties.

S

SteveN

I have an Access 2003 db with a form that have many tiny labels on
it. I would like to add a new label at the top of a column of
labels. When I add the label and set it's "Left" position in the
properties box, when I move the cursor out of the Left position box,
the number that I just typed in the Left position box changes, the
number changes when I move the cursor out of the box. While the
label is selected, I check the Format drop-down menu at the top and
Snap to Grid is not checked.
Any ideas on how to fix this?
 
E

Eric D. Braden

If I'm guessing correctly, Access is converting it to twips and then
rounding and showing the matching inch value.

For instance, 0.001 inches is 1.44 twips. So Access rounds the 1.44
twips to 1 twip, which is 0.000694 inches and displays as 0.0007
inches. 0.003 inches is 4.32 twips, which rounds to 4 twips
(~0.0028).

If that's what's causing it, I'm not sure how you can get more
precise. But you could use twips in the properties box just to make
sure you're getting as close and regular as you can. There are 1440
twips to an inch (though I've seen conflicting reports on that).
There's a helpful converter here as well:
http://www.unitconversion.org/typography/twips-to-inchs-conversion.html
 
S

SteveN

If I'm guessing correctly, Access is converting it to twips and then
rounding and showing the matching inch value.

For instance, 0.001 inches is 1.44 twips.  So Access rounds the 1.44
twips to 1 twip, which is 0.000694 inches and displays as 0.0007
inches.  0.003 inches is 4.32 twips, which rounds to 4 twips
(~0.0028).

If that's what's causing it, I'm not sure how you can get more
precise.  But you could use twips in the properties box just to make
sure you're getting as close and regular as you can.  There are 1440
twips to an inch (though I've seen conflicting reports on that).
There's a helpful converter here as well:http://www.unitconversion.org/typography/twips-to-inchs-conversion.html



- Show quoted text -

There are two labels side-by-side, in the properties box, the top
position for the label on the left is 0.7132", I copy that number and
paste that number into the top position for the box on the right side,
everything looks good, then I move the cursor out of the box, and the
number changes to 0.7125". Is it possible that each label is using a
different type of measurement? How can I fix this so they both align
at 0.7132" ??
 
E

Eric D. Braden

I'm able to reproduce that, but I don't know what is causing.
Entering it as twips (1027twips for .7132") does seem to provide a
workaround, but it's not terribly convenient.
 
D

Dale Fye

Steve

My guess is that Eric is correct. But you can also position controls by
dragging them, so my guess is that the second control was dragged or nudged
(after selecting a control, hold down the Ctrl key and press any of the arrow
buttons on your keyboard) into its current position.

The way to make sure they are lined up is to use the Align options on the
shortcut menubar. Select both textboxes, then right click on one of the
selected outlines. About 1/3 of the way down the popup menu, select the
Align option and then select whether you want to align to the top, left,
bottom, or right.
 
M

Marco Pagliero

I'm able to reproduce that, but I don't know what is causing.
I don't know either, I think, but when I hear that controls refuse to
fit to the grid it remembers me of this:

1) forms have a twin property named GridX and GridY. The default is 10
for both (in USA probably 24), but I'm accustomed to change it to 7
or 6 (USA 16 or so) in every new form, because 10 is too small and the
grid becomes "sandy" (I suppose that in this case the grid mesh is
smaller than the calculation tolerance). Then I get exactly this kind
of problems. With 7 or 6 the grid lines are farther apart and two
controls find much more easily the same line. This all depends
probably from the screen width. Small screens have more often the
problem than large ones.

2) Another point is that controls sometime don't execute correctly the
format-fit-to grid menu action and they insist to keep a width or
height not fitting to the grid (To recognise when Access draws an edge
thicker than normal). In this case it helps to pick one corner with
the mouse, enlarge the control a bit and then to reduce it to suit. If
I do that they mostly pick the right grid line and keep it. This
maneuver ist almost impossible with GridX and GridY at 10 (tiny mesh),
but very easy when at 7 or 6 (larger mesh).

But mybe your problem has nothing to do with that.

Greetings
Marco
 
S

SteveN

Steve

My guess is that Eric is correct.  But you can also position controls by
dragging them, so my guess is that the second control was dragged or nudged
(after selecting a control, hold down the Ctrl key and press any of the arrow
buttons on your keyboard) into its current position.

The way to make sure they are lined up is to use the Align options on the
shortcut menubar.  Select both textboxes, then right click on one of the
selected outlines.  About 1/3 of the way down the popup menu, select the
Align option and then select whether you want to align to the top, left,
bottom, or right.

I fixed the problem by setting the .top and .left properties of the
label in the Form load event in the vba code.
I used the website below to convert the inches to twips and then put
the vba code like: Me.lbldia132.Top = 1027.008
1027.008 equals the twips
http://www.angelfire.com/az/deaflab/measure.html

Thank You, to everyone who added a little piece that helped solve the
puzzle.
 

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