Great, I'm glad it works for you.
I'm not actually sure whether the call to ReleaseDC is required in VBA. I
adapted it from an example in C++, and this *might* be one of those
housekeeping tasks that you have to do in C++ but VB/VBA does automatically
for you. I left it in on the principle of 'better safe than sorry'! :-)
--
Brendan Reynolds
Access MVP
"JWS315" <(E-Mail Removed)> wrote in message
news

06AF832-02E1-43B5-8843-(E-Mail Removed)...
> Thanks Brendon - It works great!
>
> Jerry
>
> "Brendan Reynolds" wrote:
>
>>
>> You can do it with the following API calls. Note, though, that if you
>> change
>> the DPI setting, the new value can not be detected until Windows is
>> re-started.
>>
>> Option Compare Database
>> Option Explicit
>>
>> Private Const LOGPIXELSX As Long = 88
>>
>> Private Declare Function GetDeviceCaps Lib "gdi32.dll" ( _
>> ByVal hdc As Long, _
>> ByVal nIndex As Long) As Long
>>
>> Private Declare Function GetDC Lib "user32.dll" ( _
>> ByVal hwnd As Long) As Long
>>
>> Declare Function ReleaseDC Lib "user32.dll" ( _
>> ByVal hwnd As Long, _
>> ByVal hdc As Long) As Long
>>
>> Public Function GetDpi() As Long
>>
>> Dim hdcScreen As Long
>> Dim iDPI As Long
>>
>> iDPI = -1
>> hdcScreen = GetDC(0)
>> If (hdcScreen) Then
>> iDPI = GetDeviceCaps(hdcScreen, LOGPIXELSX)
>> ReleaseDC 0, hdcScreen
>> End If
>>
>> GetDpi = iDPI
>>
>> End Function
>>
>> --
>> Brendan Reynolds
>> Access MVP
>>
>> "JWS315" <(E-Mail Removed)> wrote in message
>> news:6687F316-9204-441C-9C11-(E-Mail Removed)...
>> > Does anyone know how to check to see what the DPI setting is using VBA
>> > in
>> > Access 2003? I want to be able to determine if the font size is
>> > "small"
>> > 96
>> > dpi or "Large" 120 dpi and issue a message to the user.
>> >
>> > Thanks!
>> > Jerry
>>
>>
>>