Hello,
I am trying to have multiple checkbox values go to one data field in an Access DB. I am trying to accomplish
this with VBA. I have six checkboxes on a form and a hidden text field "Emailed_Description" that should
collect all the checked (and unchecked) results before it goes to the database field "Emailed_Description" in
table "RTIClientTracker."
Here is the code:
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++
Private Sub Emailed_Description_BeforeUpdate(Cancel As Integer)
Dim ES As Integer, HA As Integer, MD As Integer, HP As Integer, FC As Integer, MCR As Integer
ES = Me.emailES.Value
HA = Me.emailHA.Value
MD = Me.emailMD.Value
HP = Me.emailHP.Value
FC = Me.emailFC.Value
MCR = Me.emailMCR.Value
If (ES = -1) Then
ES = "ES, "
Else
ES = " "
Debug.Print ES
If (HA = -1) Then
HA = "HA, "
Else
HA = " "
Debug.Print HA
If (MD = -1) Then
MD = "MD, "
Else
MD = " "
Debug.Print MD
If (HP = -1) Then
HP = "HP, "
Else
HP = " "
Debug.Print HP
If (FC = -1) Then
FC = "FC, "
Else
FC = " "
Debug.Print FC
If (MCR = -1) Then
MCR = "MCR, "
Else
MCR = " "
Debug.Print MCR
Me.Emailed_Description = ES + HA + MD + HP + FC + MCR
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++
Is this possible or do I need to do this another way?
Should I be adding more columns to my database for the separate checkboxes and then combine the checkbox
results in the database field "Emailed_Description" in table "RTIClientTracker?"
Thanks
Linda