MS ACCESS, ASP HELP
am 19.01.2006 19:39:28 von Gavin HallHi,
I am a Business student in my last year and for my final year project
I am trying to build an online booking appointment system for a beauty
shop
I am using dream-weaver MX, ASP (VBScript), and an Access database.
I have a limited knowledge of any programming aspects
on my appointments page I am using a form to send the data to the
database,
The problems I am having are as follows;
I can input a date and time in to the database from the form and the
connection is successful and the database updates and I receive a new
page with the appointment details on .
But when I try and submit a new appointment the entry I want to check
first of all is if the date is valid (e.g. not before the current date,
it has to be either on current date or in the future, you cant book an
appointment for time that has past)
When this is checked in the database I have the validation set at >=date
() and the rule that says please check the date entered
I want to create a message box for this if the date entered is before
todays date or the system date, but at present it shows up a blank web
page stating the following page can not be displayed and the validation
rule is shown. (please check the date entered) I know that this is
checking the database and the validation rule is working but instead of
displaying the blank page I want a error msgbox to appear asking to
re-enter a valid date.
Next problem is that I dont want to create duplicate bookings e.g.
nobody can book an appointment on the same day at the same time.
When I am testing the data, I received the a similar web page as before
only this time its saying that the database could not be updated as this
would create a duplicate entry in the database. I require another
message box to appear saying something like the time entered is not
available, select another time.
How I can check the appointment time and if the appointment time slot is
available on that date then check the date and if all is ok allow the
database to be updated.
the table is called appointment_details
The fields in the form are
Booking Text
Forename Text
Surname Text
AppointmentDate date/time
AppointmentTime Text (this is a dropdown box, to select the time
e.g. 10:00, 10:30, 11:00 etc)
Submit Button
so in a nut shell
how can check and display a message to say the date is invalid and to
select a new date
and then
how can I check for duplicate time slots on the date entered
(if the date is a valid date then it should go straight on and check
that time is free on that day)
many thanks to all who may be able to help
Cheers
*** Sent via Developersdex http://www.developersdex.com ***