Select Background Color from a field

Dim longColor As Long

Dim strColor As String

MainSQL = Select …

Set db = CurrentDb

Set rs = db.OpenRecordset(MainSQL)

strColor = rs![BackColor]

longColor = Val("&H" & strColor & "&")

Detail.BackColor = longColor