How can I ensure only increments of .25 are entered in a field

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Hi Tara,

How about creating a LaborHours table that includes the
labor hours (i.e. .25, .5, .75, 1, 1.25, etc) Then create
a combo box for them to select from. Within the combo
box, set the "limit to list" values to true so that they
can only select what been populated within the Labor Hours
table.

HTH,

Tony

-----Original Message-----
Hi. I'm pretty new to Access, and I'm trying to set a
validation rule that only allows a user to enter hours (of
labor) in increments of a quarter hour (e.g. 2.00, 2.25,
2.50, or 2.75...) Can anyone shed some light on how I can
do this. I can't find anything in Help.
 
Thanks, Tony

That actually had crossed my mind, but I decided against it. This is for a database homework assignment (it's OK, I'm allowed to ask questions online...), and in the scenario I think there would be a wide enough range of "hours of labor" that a drop down combo box would be cumbersome (there are times when hrs labor might be 19 or 20, and if I multiply that by 4 there are too many items in the list - 19.00, 19.25, 19.50, 19.75 etc... I was hoping there was some way to do a validation rule. Anybody else have any ideas? I'd really appreciate the help

Thanks, Tara
 
Tara said:
Thanks, Tony.

That actually had crossed my mind, but I decided against it. This is
for a database homework assignment (it's OK, I'm allowed to ask
questions online...), and in the scenario I think there would be a
wide enough range of "hours of labor" that a drop down combo box
would be cumbersome (there are times when hrs labor might be 19 or
20, and if I multiply that by 4 there are too many items in the list
- 19.00, 19.25, 19.50, 19.75 etc... I was hoping there was some way
to do a validation rule. Anybody else have any ideas? I'd really
appreciate the help.

Thanks, Tara

This might be good enough for practical purposes:

([HoursLabor]*4)=Int([HoursLabor]*4)
 
Back
Top