Option Compare Database
'If you're looking for the code that enables/disables code on
'the sample form, you'll find it in that form's class module,
'tied to the form's OnCurrent event, and the PaymentMethod field's
'After Update event.


Sub DefineColors()
    'This is just code you can copy-and-paste to any
    'database where you want to use color names.
    
    'Delcare some color names as Long Integer variables.
    Dim Beige, Brown, Chartreuse, DarkBlue, DarkGreen As Long
    Dim Fuschia, Gold, Gray, HotPink As Long
    Dim Lavender, Maroon, Navy, Olive, Orange As Long
    Dim Pink, Purple, Salmon, Silver, Teal As Long

    'Assign colors to variables as RGB values.
    Beige = RGB(245, 245, 220)
    Brown = RGB(165, 33, 33)
    Chartreuse = RGB(127, 255, 0)
    DarkBlue = RGB(0, 0, 139)
    DarkGreen = RGB(0, 100, 0)
    Fuschia = RGB(255, 0, 255)
    Gold = RGB(255, 215, 0)
    GoldenRod = RGB(218, 165, 32)
    Gray = RGB(128, 128, 128)
    HotPink = RGB(255, 105, 180)
    Lavender = RGB(230, 230, 250)
    Maroon = RGB(255, 0, 255)
    Navy = RGB(0, 0, 128)
    Olive = RGB(128, 128, 0)
    Orange = RGB(255, 165, 0)
    Pink = RGB(255, 192, 203)
    Purple = RGB(128, 0, 128)
    Salmon = RGB(241, 128, 114)
    Silver = RGB(192, 192, 192)
    Teal = RGB(0, 192, 192)

End Sub



