Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-26-2019, 07:54 AM   #1
Cark
Newly Registered User
 
Join Date: Dec 2016
Posts: 131
Thanks: 55
Thanked 1 Time in 1 Post
Cark is on a distinguished road
Width, Height, Top, Left Properties keep jumping around / won't accept value

I have been dealing with this issue for quite a while by just accepting it happening, however I am now wanting to ensure things are lining up perfectly and am wanting to use the Top and Left Properties for objects to align them.

However when I try aligning two items next to each other, they don't seem to want to go together. I have one Label at Top = 0.053cm and I try making the second Label go to Top = 0.053 and Access autocorrects it to 0.055. Any idea on how to rectify this?

Cark is offline   Reply With Quote
Old 09-26-2019, 07:57 AM   #2
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

use Arrange Menu on the ribbon.
select two, three or group of controls then Align them.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 09-26-2019, 11:23 PM   #3
Cark
Newly Registered User
 
Join Date: Dec 2016
Posts: 131
Thanks: 55
Thanked 1 Time in 1 Post
Cark is on a distinguished road
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

Thanks arnelgp, this has definitely helped when a control is already at a certain Top value e.g 0.741cm. However, when I have just copied across 4 controls from another Form, they automatically go to Top = 0cm and Left = 0cm. I try to move them to 0.741cm, but for some reason they jump to 0.743cm. I have been unable to get one of them to move to 0.741cm to use the Align technique.

Am I doing something incorrectly?

Cark is offline   Reply With Quote
Old 09-26-2019, 11:29 PM   #4
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,980
Thanks: 114
Thanked 3,003 Times in 2,730 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

In that situation, I set the control to slightly less than I want e.g. 0.74cm and it usually adjusts to the desired value 0.741cm
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld
isladogs is offline   Reply With Quote
Old 09-27-2019, 03:04 AM   #5
Cark
Newly Registered User
 
Join Date: Dec 2016
Posts: 131
Thanks: 55
Thanked 1 Time in 1 Post
Cark is on a distinguished road
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

I have been trying that technique Isladogs, however it still jumped up to 0.743. It seems as though Access sets up some sort of grid system (although it is not the snap to grid kind), where it only accepts certain intervals. Weirdly though, the intervals stay the same, but the values it locks to change. Not sure what triggers this.
Cark is offline   Reply With Quote
Old 09-27-2019, 04:51 AM   #6
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,980
Thanks: 114
Thanked 3,003 Times in 2,730 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

It does have a grid system of some kind though it can be overwritten in the way I suggested and by using the alignment controls.
Just tested with these results
0.739 - OK
0.74 - changed to .741 as I suggested
.741 / .742 - changed to .743
.743 - changed to .744

In reality will anyone notice the difference to this level of precision?
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld
isladogs is offline   Reply With Quote
Old 09-27-2019, 08:59 AM   #7
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,035
Thanks: 20
Thanked 381 Times in 374 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

If I remember correctly, this is also impacted by the resolution your monitor is set to. I remember having this issue when two different computers (older with lower res monitor) wouldn't let the same values be entered.

Are you working on a different computer than the one the database was originally created in? Alternately have you changed screen resolution?

Mark_ is offline   Reply With Quote
Old 09-27-2019, 09:39 AM   #8
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,980
Thanks: 114
Thanked 3,003 Times in 2,730 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

Mark
The effect described also occurs in a brand new database. Its been an irritation for years that I've learned to just work around.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld
isladogs is offline   Reply With Quote
Old 09-29-2019, 10:37 AM   #9
Cronk
Newly Registered User
 
Join Date: Jul 2013
Posts: 2,152
Thanks: 3
Thanked 470 Times in 463 Posts
Cronk will become famous soon enough Cronk will become famous soon enough
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

If it really is that critical, in your form load event,
Code:
me.YourLabelName.top = 30
Cronk is offline   Reply With Quote
Old 09-29-2019, 11:27 AM   #10
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,332
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

it's because the properties are actually stored as twips -1440 twips = 1 inch

ergo 566.929133858268 twips is 1 cm which rounds to 567

so you enter a .053cm value - that is converted to 30.0472440944882 but is rounded up to 31

31 twips converts back to .055cm

I don't know why it rounds up and I'm pretty sure I've seen typed values go down as well. I suspect it may have something to do with the conversion to twips in that .053 is stored as 31 twips - so the conversion back to cm is 'correct'
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Old 09-29-2019, 12:14 PM   #11
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,980
Thanks: 114
Thanked 3,003 Times in 2,730 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

I think the twips to cm / inch conversion is only a partial explanation.

If you look at my test values from post #18, Access will convert 0.741/0.742 (420+ twips) to 0.743 which is slightly above 421 twips but if you enter 0.743 it changes that value to 0.744 (approx. 422 twips)
It seems to (almost) always round up from the entered value
Logically I might expect it to accept 0.743 as 421 twips.

Also 0.739 cm is a smidgen over 419 twips but isn't rounded up

NOTE: I'm assuming a multiplying factor of 567 rather than the more precise version given by CJL as you can't have a part twip!

There are clearly numerous other similar examples.
However as I said earlier, I doubt anyone will notice to that degree of precision
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld

Last edited by isladogs; 09-29-2019 at 01:01 PM.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Tera (09-30-2019)
Old 09-29-2019, 02:18 PM   #12
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,332
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

Quote:
I'm assuming a multiplying factor of 567
the weenie bits matter!

using those values in the immediate window

?0.741*(1440/2.54)
420.094488188976
?0.742*(1440/2.54)
420.661417322835

both round up to 421 twips
convert back to cm
?round(421/1440*2.54,3)
0.743

next example
?0.743*(1440/2.54)
421.228346456693

round up to 422 twips
convert back to cm
?round(422/1440*2.54,3)
0.744

and final example
?0.739*(1440/2.54)
418.96062992126
round up to 419 twips
convert back to cm
?round(419/1440*2.54,3)
0.739

Not sure for the reason for round up - the smallest value you can enter (other than zero) is 0.001

?0.001*(1440/2.54)
0.566929133858268

which would round up anyway to 1 twip.

Perhaps something to do with inches? 0.001 inches would be 1.44 twips Perhaps one of our American cousins can check? Or perhaps inches goes to 4dp?

Anyway, as stated the difference is a maximum of 1 twip - approx 1 hundredth of a milimetre
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following 2 Users Say Thank You to CJ_London For This Useful Post:
isladogs (09-29-2019), Tera (09-30-2019)
Old 09-29-2019, 02:55 PM   #13
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,980
Thanks: 114
Thanked 3,003 Times in 2,730 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

Hi CJL
You've convinced me!
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld
isladogs is offline   Reply With Quote
Old 09-29-2019, 09:17 PM   #14
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,554
Thanks: 92
Thanked 1,682 Times in 1,560 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Width, Height, Top, Left Properties keep jumping around / won't accept value

For our friends who use cm for length or height units, the problem is that the unit of TWIPS (as so correctly brought up by CJL) doesn't come out even in metric units. You have to remember that there are 1440 twips per inch. But this unit is 12x12x10, so that means that you can divide 1440 evenly by 2, 3, 4, 5, 6, 8, 9, 10, and 12. (7 won't make it and neither will 11). So units of 1/2 inch, 1/3 inch, 1/4 inch, 1/5 inch, 1/8 inch, and even 1/16 inch divide evenly into to the twips unit. But for cm, that 2.54 cm/inch conversion just confuses the works tremendously. Lots of roundoff issues.

I know that if I am attempting something extremely precise when sizing something, if it pick something that doesn't divide evenly into 1440, I get that jumping around, too. I think it occurs because the display driver has to convert the length to twips as an integer and if it doesn't come out even, then Access "adjusts" the number to one that DOES come out as even as possible.

__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
Tera (09-30-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autosize a column's width and height? FisherIles Reports 1 04-05-2016 11:43 AM
html5 Width / Height as a Percentage Simon_MT Web Design and Development 1 03-02-2012 02:21 PM
Code to set form height and width josephbupe Forms 1 04-17-2010 11:13 PM
applications width and height nelleh General 1 01-20-2006 04:31 AM
combo box values jumping to the left betsyr Forms 3 06-25-2002 09:45 AM




All times are GMT -8. The time now is 04:54 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World