I would be grateful for help with the following:
For a booking system
tblBook(BookedI temId,DateBooke d)
tblBookingPerio dAllowed(Period Name, PeriodStartDate , PeriodEndDate)
I want:
1. the DateBooked to be entered into txtDate on a bound form
frmBooking (source = tblBook)
2. DateBooked to be checked to see if it lies between any pair of
PeriodStartDate and PeriodEndDate
where a typical period lasts 12 weeks with 3 week gaps.
There several periods in tblBookingPerio dAllowed and so
3. If DateBooked lies within the allowed period, then it should be
accepted
4. If DateBooked lies outside of the allowed period, then it should be
rejected, with a message box indicating the fault.
Any ideas? 3 1441
On 9 Mar 2006 12:32:13 -0800, "4004" <m.********@ntl world.com> wrote:
If BookingPeriods cannot overlap, then you could use DLookup:
DateBooked_Befo reUpdate(Cancel as Boolean)
dim varPeriod as Variant
varPeriod = DLookup("Period Name","tblBooki ngPeriod", "PeriodStartDat e
<= #" & txtDate & "# and PeriodEndDate >= #" & txtDate & "#") then
If IsNull(varPerio d) then
Msgbox "Not in a booking period!"
Cancel = True
else
Msgbox "In period " & varPeriod
end if
Note the use of the BeforeUpdate event. It's the one to be used for
field validation.
-Tom. I would be grateful for help with the following:
For a booking system
tblBook(Booked ItemId,DateBook ed)
tblBookingPeri odAllowed(Perio dName, PeriodStartDate , PeriodEndDate)
I want:
1. the DateBooked to be entered into txtDate on a bound form frmBooking (source = tblBook)
2. DateBooked to be checked to see if it lies between any pair of PeriodStartDat e and PeriodEndDate
where a typical period lasts 12 weeks with 3 week gaps. There several periods in tblBookingPerio dAllowed and so
3. If DateBooked lies within the allowed period, then it should be accepted
4. If DateBooked lies outside of the allowed period, then it should be rejected, with a message box indicating the fault.
Any ideas?
Thanks, that worked, it was just the 'magic bullet' function I was
looking for.
However, I used:
dlookup("Period Name","tblBooki ngPeriod", "PeriodStartDat e
<= txtDate and PeriodEndDate >= txtDate")
i.e. stripped out the # etc.
On 10 Mar 2006 14:16:50 -0800, "4004" <m.********@ntl world.com> wrote:
That often works. Good for you trying it.
I prefer the other syntax, which always works.
-Tom. Thanks, that worked, it was just the 'magic bullet' function I was looking for.
However, I used:
dlookup("Perio dName","tblBook ingPeriod", "PeriodStartDat e <= txtDate and PeriodEndDate >= txtDate")
i.e. stripped out the # etc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave Robinson |
last post by:
I was wondering if anyone could help me with a problem I'm having.
I've been using Dreamweaver to create a hotel booking system for a
friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm
struggling with is checking the Room Availability based on dates that
are typed into a textfield and then returning a list of the available
rooms on the next page.
The three tables involved in this function are:
CREATE TABLE `room` (
|
by: Andy |
last post by:
Hi folks
I teach. At school, four IT rooms are booked using a paper based outline
timetable. Completing it is easy but basic and impossible to ensure
completion of all fields (name, year group, subject and software) and
analysis of bookings is a nightmare.
I just fancied pottering with Access, which I am pretty familiar with, to
see if I could create a means of booking a room using a database. Locking a
booking would then be a...
|
by: Andy |
last post by:
Hi folks
I teach. At school, four IT rooms are booked using a paper based outline
timetable. Completing it is easy but basic and impossible to ensure
completion of all fields (name, year group, subject and software) and
analysis of bookings is a nightmare.
I just fancied pottering with Access, which I am pretty familiar with, to
see if I could create a means of booking a room using a database. Locking a
booking would then be a...
|
by: thegame21 |
last post by:
Hi, I am currently creating a cinema system using access where a
booking can be made for a event. Each event when it is shown is
categoriesd as a performance. A booking must be made for each
performamce. I have a constructed a query between the booking, event
and peformance tables and created a subform on the booking form. The
event table is linked to the performance table which in turn is linked
to the booking table. I keep on getting the...
|
by: NDayave |
last post by:
How do,
I have a access 2000 booking database with Personal Details, Outing Details and the Bookings in three tables:
tblBookings -- -Autonumber, -Number, -Number, -Currency, -Yes/No, -Yes/No
tblPersonaldetails -- -Autonumber, etc
tblOutingDetails -- -Autonumber, etc
| |
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |