A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

validation rule for time field



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2006, 08:50 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default validation rule for time field

We have a SQL database using Access project files to run forms etc. There is
a field where the user must enter the time. The time must be either :15 or
:45 minutes after the hour. (So it could be 1:45 or 6:15, but not 1:46 or
6:14.) We'd like to set up a validation rule that requires the time be **:14
OR **:45, but we can't figure out how to put that in. Does anyone have an
answer to this?

Your help is appreciated!
  #2  
Old June 8th, 2006, 09:06 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default validation rule for time field

Try this --
Format([YourFieldName],"nn")=45 Or Format([YourFieldName],"nn")=15

Then type in a validation rule message.

"signal2182" wrote:

We have a SQL database using Access project files to run forms etc. There is
a field where the user must enter the time. The time must be either :15 or
:45 minutes after the hour. (So it could be 1:45 or 6:15, but not 1:46 or
6:14.) We'd like to set up a validation rule that requires the time be **:14
OR **:45, but we can't figure out how to put that in. Does anyone have an
answer to this?

Your help is appreciated!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Rule for separate field BT General Discussion 2 March 17th, 2006 04:01 PM
Validation Shep99 General Discussion 11 December 15th, 2005 12:43 PM
Using another field as a validation rule [email protected] General Discussion 2 December 12th, 2005 10:26 PM
Field Validation Rule fails in VBA ! Arnaud Lesauvage General Discussion 0 September 7th, 2005 01:57 PM
Validation Rule question Lori Using Forms 1 July 20th, 2004 06:32 PM


All times are GMT +1. The time now is 06:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.