I'm trying to set up a "preferences form" where users can choose from a few
different pre-defined colors. The color numbers and form names are saved in
tblColors. The below code changes the form backcolor no problem, but the colors
go back to what they were before if I close and reopen the database. How to I
save the changes? Shouldn't "DoCmd.RunCommand acCmdSave" do the trick?
For Each varF In Array("frm0", "frm1", "frm2", "frm3")
If DLookup(varF, "tblColors") = -1 Then ' this form selected for new
color
Forms(varF).Detail.BackColor = DLookup("Color", "tblColors")
DoCmd.Save acForm, varF
End If
Next
DoCmd.RunCommand acCmdSave