Author: Calvin Smith
http://www.CalvinSmithSoftware.com/codedisk/sneakpeek.htm

The following code will allow a developer to programmatically call the color dialog box.


'We need the following API declaration first

Declare Function CallColorDialogBox& Lib "msaccess.exe" _
 Alias "#53" (ByVal hWnd As Long, rgb As Long)

Function ChooseColor(lAnyRGBColorNumber As Long) As Long

On Error GoTo ErrorHandling_Err

' ---------------------------------------------------------------------------------
' Author: Calvin Smith
' Environment(s): MS Access (32-bit) 
' ---------------------------------------------------------------------------------
'
'   *****************************************
'   * Courtesy code from my CodeDisk© product
'   *****************************************
    ' -----------------------------------------------------------
    ' Purpose: Example of how to call the color dialog box
    '             from MS Access (32-bit)
    '
    ' Accepts: lAnyRGBColorNumber as the color number to choose
    '
    ' Returns: The return value from the API call
    '
    ' Example usage: lRetVal& = ChooseColor(0)
    ' -----------------------------------------------------------


Dim lRetVal As Long

    lRetVal& = CallColorDialogBox(Application.hWndAccessApp, lAnyRGBColorNumber)

ErrorHandling_Err:
    If Err Then
        'Trap your error(s) here, if any!
    End If
End Function