Check box depending on day

andymac

Registered User.
Local time
Today, 11:35
Joined
Jun 2, 2013
Messages
36
Hello,

I'm currently making a signup form for a 6day event.
Certain details are taken (Name, Age, Contact no etc).

I also have a registration form; so when someone comes back for the second day of the event I tick the 'saturday' checkbox, or 'monday', or whatever the day is...

When someone comes to sign up for the first time, I'd like the form to automatically check the box for that day (to indicate their attendance). This would save me opening two forms to signup one person, if I make sense.

So, when someone comes to register on a Tuesday, I fill in all their details - and then it automatically checks the 'tuesday' field box.

Thanks

Andy
 
2 steps to this;
  1. Use the WEEKDAY() function to return the day of week for the current date
  2. A select case to tick the correct checkbox

So the code would be similar to:

Select case Weekday(Date())
Case 1'Sunday
cbSunday = true'or whatever the checkbox is called for sunday
Case 2'Monday
cbMonday = true
etc

The only question then is when to trigger this. Do this as an AfterUpdate event on another control (say Name) or with a CommandButton
 
That's great, got that to work!

Now, the conference starts on a saturday, and runs to thursday - what would I need to change? Also - people can sign up on the Friday night, but obviously I don't want any box ticked (as they could potentially sign up - but never attend!) how would this be accomplished?

Also, I tried changing the date in Windows to tuesday, but the Database still ticked the 'monday' box. Perhaps access cannot be fooled like this?

Thanks
 
You could apply a time filter before the SELECT CASE.

If Time() < "18:00:00" then
Select.....


Not sure about changing the date in Windows. The Weekday function does have an optional second variable that determines the first day of the week. See if that makes any differences
 
Sorry for delay - brilliant - works like a charm!!

Thanks a mill - any thoughts on my other thread? Head's wrecked with it lol!
 

Users who are viewing this thread

Back
Top Bottom