Default units of measurement: Pixels

Chrism2

Registered User.
Local time
Today, 12:51
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? ;)
 
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.
 
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.
 
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.
 
As a matterof interest TWIP stands for Twentyth part of an inch
 
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!
 
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
 
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

Back
Top Bottom