Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012

    Unanswered: Update a table field with multiple checkbox values


    I have a db that has a form listing days that a person would work. For each day of the week I have a checkbox. The user would go into the form and check the days the person should work for that week. All of that works nicely.

    However, I need to export a table/query or report that would show the worker name, email address, and days that they are working. The purpose of this is to export an email list so that we can email the shifts to each worker.

    How would I get multiple values from the checkboxes into one database field called shifts?

    Example of the exported file: Name: John Smith
    Shifts: Mon, Tue, Thur

    Thank you!

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    Here's an example showing just three days, to demo purposes. You'll need to expand it to cover the full work week, as well as plugging in your own Field/Object names.

    Field Names


    In Query Design View you'd create a Calculated Field, named Schedule, by entering this in a blank Field box:

    Schedule: IIf([txtMon]=-1,"Mon","") & " " & IIf([txtTue]=-1,"Tue","") & " " & IIf([txtWed]=-1,"Wed","")

    Or the SQL Statement would be something like this:
    SELECT ScheduleTable.Employee, ScheduleTable.txtMon, ScheduleTable.txtTue, ScheduleTable.txtWed, IIf([txtMon]=-1,"Mon","") & "  " & IIf([txtTue]=-1,"Tue","") & "  " & IIf([txtWed]=-1,"Wed","") AS Schedule
    FROM ScheduleTable;
    Linq ;0)>
    Last edited by Missinglinq; 05-19-12 at 23:14.
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Apr 2012
    Thank you, I will give this a try.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts