Using 7 check boxes to select a day (one field)

S

Steve

I have a table with two fields EmplNbr and DayOff. I would like to
use a form which shows all employees on a crew followed by seven
checkboxes, one for each day of the week. From this form the Foreman
can see and change the employees regular days off. I can't figure out
how to get the information representated by the checkboxes into the
table. It would be a simple matter to have a table with emplnbr and
seven fields for each day of the week but this is sloppy and I really
want to do it right.

Thanks for the help. I see Maurice is browsing the area - hope you
are keeping warm in Ontario.
 
H

Howard Brody

Add a locked TextBox after the CheckBoxes and bind that to
the DayOff field. Put your seven CheckBoxes within an
OptionGroup and update the TextBox anytime the day off is
changed:

Private Sub optDayOff_Change()
Select Case OptDayOff
Case 1
[txtDayOff] = "Sunday"
Case 2
[txtDayOff] = "Monday"
And So On...
End Select
End Sub

If you're uncomfortable with VBA code, you can do the same
thing with a macro using conditions and the SetValue
action.

Hope this helps!

Howard Brody
 
S

Scott McDaniel

Use an Option Group with the .ControlSource set to DayOff ... assuming
DayOff is a numeric field (which it should be) ...
 
S

StCyrM

Hi Steve

I think you should use 8 fields, one for your employee number and one for each
day of the week that you can simply check off as required It will make your
life a lot easier.

Thanks for the cold weather reminder. Right now it's -18 and the forecast is
for -29 tonight. (Brass monkey warning!)

Best regards

Maurice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top