By Richard Rost 3 years ago
Force 15-Minute Increments in a Time Card
Learn how to force your users to input values in 15-minute increments (or whole minutes, or whole hours, or whatever restrictions you want to set) by using a Validation Rule in Microsoft Access.
Sharon from Puyallup, WA (an Access Expert student) asks: I'm creating a time card in Microsoft Access. How do I restrict time entry to 15-minute increments? I was hoping to enter a validation rule that warns them they must enter time in 15-minute increments and let the user fix it, instead of automatically rounding. I don't know how to structure the validation test.
I'll show you how to round the start time down to the nearest 15-minute interval, and round the end time up to the next interval. This is great for billing customers! LOL. We'll use the AfterUpdate event and the TimeSerial function along with some good old VBA coding.
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to register on my YouTube Find User page so I can set up your account here on my web site. If you're not a member, Join Today!
Validation Rules: https://599cd.com/ValidationRule
Subscribe to 15-Minute Increments
Get notifications when this page is updated