S
Scientific
Hello all,
I have created different backgrounds that I use in a form and want to have
users choose which background to use when they use the database. I have
sample code below which assigns colors to different controls depending on
which background is in use. For example, if a user chooses the 49ers
background I would need to have the 49ers background and it's color settings
load into the form. Right now I'm doing things manually, but I figure there
has to be a way to automate this task.
Can something like what I described above be done using VB? Thanks in
advance.
-S
Select Case CurrentUser()
Case "Barney Rubble", "Fred Flinstone"
Me.Picture = "C:\DB\Bedrock.jpg"
' ComboBox Label Colors
Me.lblDepartment.ForeColor = "0"
Me.lblEmployee.ForeColor = "0"
Me.lblJob_Title.ForeColor = "0"
Me.lblNotes.ForeColor = "0"
' ComboBox Back Color
Me.cboDept.BackColor = "16777215"
Me.cboEmp_Name.BackColor = "16777215"
Me.cboJob_Title.BackColor = "16777215"
Me.cboNotes.BackColor = "16777215"
Case "Joe Montana"
Me.Picture = "C:\DB\49ers.jpg"
' ComboBox Label Colors
Me.lblDepartment.ForeColor = "16777215"
Me.lblEmployee.ForeColor = "16777215"
Me.lblJob_Title.ForeColor = "16777215"
Me.lblNotes.ForeColor = "16777215"
' ComboBox Back Color
Me.cboDept.BackColor = "0"
Me.cboEmp_Name.BackColor = "0"
Me.cboJob_Title.BackColor = "0"
Me.cboNotes.BackColor = "0"
I have created different backgrounds that I use in a form and want to have
users choose which background to use when they use the database. I have
sample code below which assigns colors to different controls depending on
which background is in use. For example, if a user chooses the 49ers
background I would need to have the 49ers background and it's color settings
load into the form. Right now I'm doing things manually, but I figure there
has to be a way to automate this task.
Can something like what I described above be done using VB? Thanks in
advance.
-S
Select Case CurrentUser()
Case "Barney Rubble", "Fred Flinstone"
Me.Picture = "C:\DB\Bedrock.jpg"
' ComboBox Label Colors
Me.lblDepartment.ForeColor = "0"
Me.lblEmployee.ForeColor = "0"
Me.lblJob_Title.ForeColor = "0"
Me.lblNotes.ForeColor = "0"
' ComboBox Back Color
Me.cboDept.BackColor = "16777215"
Me.cboEmp_Name.BackColor = "16777215"
Me.cboJob_Title.BackColor = "16777215"
Me.cboNotes.BackColor = "16777215"
Case "Joe Montana"
Me.Picture = "C:\DB\49ers.jpg"
' ComboBox Label Colors
Me.lblDepartment.ForeColor = "16777215"
Me.lblEmployee.ForeColor = "16777215"
Me.lblJob_Title.ForeColor = "16777215"
Me.lblNotes.ForeColor = "16777215"
' ComboBox Back Color
Me.cboDept.BackColor = "0"
Me.cboEmp_Name.BackColor = "0"
Me.cboJob_Title.BackColor = "0"
Me.cboNotes.BackColor = "0"