473,412 Members | 5,361 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Validation rule to prevent bookings being made at the same time

Hi. I am creating a booking system for a cleaner (project) on Access, and I need to prevent double bookings being made at the same time on the same date. I have a 'Job Date' field which is the day the cleaner has to do the job and a 'Job Time' field which is a drop down list of times with half hour gaps in between e.g. 7:00 am, 7:30 am, 8:30 am etc.
I have done some research and I know how to prevent double bookings if there is a start and end time for the job, but in my case it is not. Help is appreciated!
Thanks
Feb 16 '12 #1
5 2091
Rabbit
12,516 Expert Mod 8TB
If there's no end time, how would you know if something is double booked?
Feb 16 '12 #2
For example I don't want two bookings being made on 18/03/2012 at 9:30 am
Feb 16 '12 #3
NeoPa
32,556 Expert Mod 16PB
Typically, this is done using Time Interval Overlapping (MS Access 2003).

If you have periods with no end however, you need to consider what you're really asking (preferably before posting your question). If you want to consider a period without an end point as terminating in the now, then treat empty (Null) values as Now(). If you'd like to treat them as ending never, then #12/31/9999# makes a good approximation to that.

I'm afraid we're in no position to tell you what your question should have been though.
Feb 16 '12 #4
i see what you mean with #12/31/9999#
the bookings last half an hour each, so #12/31/9999# is the way to go about it right?
Thanks
Feb 16 '12 #5
NeoPa
32,556 Expert Mod 16PB
The main point I was trying to make is that we cannot possibly answer that, as that is for you to decide.

Certainly, if you want to treat a record without an end date as indicating one that goes on for ever, then that would work for you.
Expand|Select|Wrap|Line Numbers
  1. Nz([End Date Field], #31/12/9999#)
Feb 16 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dalan | last post by:
This ought to be simple enough, but not certain which to use. I have a few fields set to Require data to be entered; however, the message displayed by Access 97 is too generic to be of any real...
2
by: Joey P | last post by:
Hi all, I am doing a project for university whereby i have to implement a simple database related to a frozen foods company. I am having some trouble though creating a validation rule for one...
2
by: Danny | last post by:
I created a function to test to see if entered text has a '.' in it, The code seems to work but the validation always fails even when 'true' is returned. i put = myfunction in the validation...
6
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
4
by: ron | last post by:
I have a access based guest book. I want to create a validation rule to block certain words or parts of a srting. How do i do this? ie: this is a nice site. come visit my porn site at www.abc.zy...
4
by: Anansie | last post by:
Hello! I have a problem with this table PRODUCTS, it has the following fields: -Product id: Number, single, primary key -Status: validation rule with the following restrictions: in stock,...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
6
dragonsbreath
by: dragonsbreath | last post by:
Firstly I am not a coder. I am trying to add a validation rule to an input form that will prevent users’ creating more than one record per organisation. This DLookUp seems to work ...
1
by: MLH | last post by:
Anyone remember if A97 append query failure would ever report data breaking validation rule when such was not the case. I have an old SQL statement - several years old now. I've encountered a case...
1
by: Wendy Sullivan | last post by:
I have a table (LOG) with the Fields First Name, MI, and Last Name. My primary key is an Autonumber, but I would like to prevent duplicate name entries. However I have several names (like Jose...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.