•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 391,909 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,636 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 3998 | Replies: 2
![]() |
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
I'm a novice at microsoft access and I'm trying to make a validation rule to limit what can be entered in a field for hours worked. I set the field size to decimal. I set it up to have 2 digits to the right and left of the decimal point. An axample is for an 8 hour day you would have to enter 08.00. I set it up to limit it to 24 hours by putting <24 in the validation rule box, too. The real problem is I need for the time to be entered in 1/4 hour increments, such as, 6.00, 5.25, 8.50 or 7.75. I've tried a few different ways but nothing is working. I could please use anybodies help with this.
Thanks,
Dan
I'm a novice at microsoft access and I'm trying to make a validation rule to limit what can be entered in a field for hours worked. I set the field size to decimal. I set it up to have 2 digits to the right and left of the decimal point. An axample is for an 8 hour day you would have to enter 08.00. I set it up to limit it to 24 hours by putting <24 in the validation rule box, too. The real problem is I need for the time to be entered in 1/4 hour increments, such as, 6.00, 5.25, 8.50 or 7.75. I've tried a few different ways but nothing is working. I could please use anybodies help with this.
Thanks,
Dan
•
•
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation:
Rep Power: 0
Solved Threads: 4
There is something fundamentally incorrect with what you are doing.
I am guessing that you used "Decimal Places" to set the digits right of the decimal separator. That won't work because the setting is only for what data needs to be displayed. You need to set the "Scale" for the number of digits to be stored to the right of the decimal separator. You would also need to set the "Precision" to 4 to have two digits on the left and two on the right.
I tried it this way and it works for me.
I am guessing that you used "Decimal Places" to set the digits right of the decimal separator. That won't work because the setting is only for what data needs to be displayed. You need to set the "Scale" for the number of digits to be stored to the right of the decimal separator. You would also need to set the "Precision" to 4 to have two digits on the left and two on the right.
I tried it this way and it works for me.
...And to provide the final touch about the validation part configure your table column as follow:
And voila, the field will work as you expected it to work....
PS: Moving this thread to the MS Access Forum...
•
•
•
•
At the time of field creation in design view...
Field Name: hours
Data Type: Number
And now the field general properties (at the bottom, in design view)
Field Size: Decimal
Scale: 2
Decimal Places: 2
Validation Rule: ([hours] * 100)Mod(25) = 0
Validation Text: The entered value should be in steps of 0.25
And voila, the field will work as you expected it to work....
PS: Moving this thread to the MS Access Forum...
Last edited by ~s.o.s~ : Jan 22nd, 2007 at 12:26 pm.
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS Access and FileMaker Pro Marketplace
•
•
•
•
access activation advertising ajax antivirus apple asp c# code computer console crack development drm exploit firefox game google internet ip ipod key linux mac malware microsoft mozilla mp3 news office open operating os pc photo product security software source spyware survey system upgrade virus vista web windows xbox 360 xp zune
- linking database Microsoft Access with VB.NET (VB.NET)
- Access 2007 Validation Rule Error (MS Access and FileMaker Pro)
- MS Access validation rule help (MS Access and FileMaker Pro)
- BDE Alias for ACCESS 2003 User/pwd ?? (C++)
- Microsoft Access Format/Validation ??? (Windows Software)
- Microsoft Access date validation (Computer Science and Software Design)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: MS Access validation rule help
- Next Thread: most populer query ?



Linear Mode