Why won't Access 2K Accept Exact Top, Left, etc Entries in Text Box Properties?

donthee
donthee used Ask the Experts™
on
I am trying to line up some text boxes on several forms so they'll appear in exactly the same place on the screen for each form.  But many times the value I enter is changed to a value that is close to but not exactly what I entered.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
try aligning your textboxes to grid
right click on the textbox
select Align to grid
get the values for Left, Top

Author

Commented:
Capricorn -

I may be misunderstanding but let me amplify, as I am not able to get your instructions to work.  In form 1 I have a text box that presently has specific top and left values.  In form 2, when I input that value for the corresponding text the value that I inputted for form 2 is changed to a different value.  If I go back into form 1 and do Align to Grid on the text box, then input those new values into form 2, the form 2 value is not allowed to remain as entered.  (it is changed to a value that is close but not the same.)  I don't understand why the values are ok for form 1 and not for form 2.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
I am confused as well.

  "A picture is worth a thousand words"

Please post a screeshot of what you have now (What you don't like)

Then somehow mark up this screenshot to *clearly* show what you DO Want.

;-)

Thanks

JeffCoachman
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
boag2000

I can not post a marked up screen shot but I don't think this is that confusing.  I am probably not explaining this well.  Let me give you a specific example.

On form1, TBox1 resides at: Top = 0.0854", Left = 0.1167"

On form2, when I enter these values for TBox2, which I want to be in the same place on form2 as TBox1 is on form1, the resulting values in form2 are:
                                                     Top = .0847", Left = 0.116"

I don't understand why I can't enter them on form2 to be the same as form1.
MIS Liason
Most Valuable Expert 2012
Commented:
Ahhh.

That is because of "rounding".

The actual Grid position can be a number with infinite decimals.

For example a Left point of: 0.1167" is actually .11666666666666666666666666666666666 ...ect

Only points like .5, .25, .125, ...ect (Up to a certian number of decimals) will be exact.

So when you enter .1167, Access will round/truncate it to .116 or something close.

If you want the positions to be exact, don't type in numbers directly, instead move the controls manually (Either with the mouse, or by using the keyboard (Ctrl+ArrowKeys)) to the position you want.

Then check/compare the values to make sure they are the same for all the controls on all the forms

;-)

JeffCoachman

Author

Commented:
boag2000,

I will accept your answer re a way to work around this but I do have a couple more questions that relate to your solution:  

I see where rounding could come into play re the 0.1167 to 0.116 result but how does that explain the 0.0854 to 0.0847 result?

And, when Ctrl+arrow is used to move the text box, what determines the distance it moves with each click?  And, can that be adjusted to be a smaller increment?

Thanks for your help.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
My first question would be how you decided on .0854?
What is you current Grid setting.
Because if you keep the default grid spacing, the two closest increments are .0833... and .09375.

<what determines the distance it moves with each click?>
This will be dependent on you grid setting, but for the standard US grid in Units, 1 inch is divided into 24 increments (the default Grid spacing)
This means that one increments is .04166666666666666666666666666666666666666666666666... ect, Inches.
So, already you can see that it will never always be perfect.
Holding down the control key while moving will give you 4 parts inside a the .0416666666666666666666... increment or 0.10416666666666666666666666666666666666666666666...ect.

But again you can verify all of this yourself.
The standard grid is 1 inch, you can count/see the 24 increments yourself correct?
If you hold down control and use the arrow key you will see that there are 4 increments in side the larger increment.
Then you can do all the math I did yourself correct?

JeffCoachman

Author

Commented:
boag200,

Thanks for the reply.  The original placement of TBox1 on form1 was done according to other controls around it with no regard for form2, which didn't have these controls yet.  Your replies are helpful.  I should be able to fiddle with them and get the desired result.  Thanks again.

Author

Commented:
Your comments will help me to get the desired result but, more important, you filled me in on some of Access' workings in this area.   Thanks.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Thanks,

But also thank *you* for an interesting and thought provoking question.
;-)

Jeff

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial