Default units of measurement: Pixels (1 Viewer)

Chrism2

Registered User.
Local time
Today, 00:31
Joined
Jun 2, 2006
Messages
161
Now, is there any way to change the default unit of measurement used by Access to pixels given that VBA wants to speak in pixels as it's unit of measurement?

I see the controls are affected by Regional settings, but with a choice of inches or centimeters, neither gives the convenience of talking the same sizes.

Any clues? Or is this a sick Redmond prank? ;)
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Jan 20, 2009
Messages
12,854
VBA in Access does not use pixels but Twips. (1/20 Point)
1440 Twips per Inch or 567 Twips per Centimetre
If you find this a problem, create conversion functions so you can work with Inches or Centimetres in VBA.

Access itself works in twips and converts displayed values to and from the user's preferred units shown in the properties. Since the twip is an imperial unit, the small rounding error (566.929 t/cm) is the reason Access rarely displays integer (or even rounded decimal place) centimetres despite what is directly entered by the user.
 

wazz

Super Moderator
Local time
Today, 07:31
Joined
Jun 29, 2004
Messages
1,711
the small rounding error (566.929 t/cm) is the reason Access rarely displays integer (or even rounded decimal place) centimetres despite what is directly entered by the user.
thanks for that.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Jan 20, 2009
Messages
12,854
Just to clarify.
Access stores integer twips and converts using exactly 567 twips per centimetre. Use this figure for conversion functions rather than the higher precision decimals.

The slight error from the rounding is just over one part in 10000 and results in a full twip error at about 12 cm. Since a twip is less then 18um you would need a very precise ruler to spot the variation.:D

Anyway it is not really this inaccuracy that makes Access do poorly at displaying sensible decimal fractions of centimetres. At 0.00176 cm the twip is nearly twice the displayed centimetre precision.
 

DCrake

Remembered
Local time
Today, 00:31
Joined
Jun 8, 2005
Messages
8,632
As a matterof interest TWIP stands for Twentyth part of an inch
 

Chrism2

Registered User.
Local time
Today, 00:31
Joined
Jun 2, 2006
Messages
161
Just to clarify.
Access stores integer twips and converts using exactly 567 twips per centimetre. Use this figure for conversion functions rather than the higher precision decimals.

The slight error from the rounding is just over one part in 10000 and results in a full twip error at about 12 cm. Since a twip is less then 18um you would need a very precise ruler to spot the variation.:D

Anyway it is not really this inaccuracy that makes Access do poorly at displaying sensible decimal fractions of centimetres. At 0.00176 cm the twip is nearly twice the displayed centimetre precision.

Colour my mind blown. :eek:

Many thanks!
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 09:31
Joined
Jan 20, 2009
Messages
12,854
As a matterof interest TWIP stands for Twentyth part of an inch

Not quite. It is a 1/20 part of a Point which is 1/72 of an inch.
Hence 1/1440 of an Inch.

I have heard it explained as:
TWentieth of an Imperial Point
 

treva26

Registered User.
Local time
Yesterday, 16:31
Joined
Sep 19, 2007
Messages
113
Has anyone got a function to convert twips/points to pixels?
I cant seem to find one.

I believe you need the screens dpi (both directions)..
 

Users who are viewing this thread

Top Bottom