Please Help-Conditions On Query Results (Booking Problem)
Nov 23, 2004
Ok i'm new so don't be too hard.
I'm making the most simple DB where there are bookings consisting of a StartDate and EndDate. The Scenario is a car hire firm. Obviously i don't want to be able to double book a car and want to be able to list all cars available within the two dates (input).
I have set the defult input to 12/07/04(StartDate) and 12/17/04(EndDate) for the purpose of testing.
I have created a query to find all cars which are not available in relation to the input dates, but cannot get it to list the available cars!
SELECT CarDetails.CarReg
FROM CarDetails INNER JOIN BookingDetails ON CarDetails.CarReg = BookingDetails.CarReg
WHERE (((((([BookingDetails].[StartDate])<#12/7/2004#) And (([BookingDetails].[ReturnDate])<#12/7/2004#)) Or ((([BookingDetails].[StartDate])>#12/17/2004#) And (([BookingDetails].[ReturnDate])>#12/17/2004#)))=False));
When a customer makes a booking, all I need to do is check that there is less than 20 cats in the cattery for every day of the customer's intended visit range. This isn't the same as a car-hire system where if a car is out for one day during the intended hire, then the booking can't be made - it doesn't matter which pen a cat is put into, as long as there is a pen free for each day of their visit.
i.e. a customer wants to hire a ford escort from 1st-10th january but it is already booked for the 9th onwards - the booking can't be made.
a customer wants to put their cat in ANY pen from the 1st - 10th so it just depends on ONE pen being free for every day of this visit.
Any suggestions? My teachers are hopeless and I need to have implemented my system by 20th January!!! :eek: Thanks, Jayce
I had two tables parent(f1) , child(f1,f2,f3). I had to display f3 value for parent(f1) when f1 has only one f2, if f2 values are more than one for single f1 and if all f3 values are 0 then i should display f3 as 0, else if some values for f3 are nonZeros and some are Zeros then is should display f3 value as '-'.
I am so frustrated right now that I could scream. I have a database which tracks attendance and referrals for a networking organization - it meets weekly on Thursdays. It has a report which displays totals of both attendance and referrals for each weekly meeting for an entire month. The problem I am having is related to the fact that some months have 4 Thursdays and some have 5. If I get my queries to display the meeting dates correctly for the 4-Thursday months, then it displays incorrectly for the 5-Thursday months, and vice versa.
Is there any way to put a criteria on a missing record? If I could have it just populate the 5th week with spaces or null when it doesn't exist for that month, it would make my life a lot easier.
I can send a copy of the database to anyone who thinks they can help. It's too big to post.
I have a filed and I want to find out its length then in the next column i have to add the data like if filed 1's length is 1 then it should be 000+field1.value, if it is 2 then 00+field1.value, if it is 3 then 0+field1.value and so on...any help is appreciated , thanks
For some reason, this one is driving me nuts so i would really appreciate some help. This is kind of complicated to explain but here goes. I am trying to create a query so that, based on certain conditions certain rows from the Form/Table are either visible or not visible on the report. I have four fields involved: Antic Dep$ (Anticipated Deposit Amount) Antic Loan$ (Anticipated Loan Amount) Date Dep Booked Date Loan Booked
Basically i am trying to hide any records that in which the Date Dep Booked and/or Date Loan Booked are older than the current month...
I can think it through logically but cannot get my head around the query.
If Date Dep Booked or Date Loan Booked is not older than current month then show the row; If Date Dep Booked is older than current month and Date Loan Booked is older than current month then hide the row; unless
If Date Dep Booked is older than current month but Date Loan Booked is not older than current month then show the row; except If Date Dep Booked is older than current month and Antic Loan$ is zero then hide the row; but If Date Dep Booked is older than current month and Antic Loan$ is not zero then show the row;
Then i also need to do the reverse for the Date Loan Booked, i.e.
If Date Loan Booked is older than current month but Date Dep Booked is not older than current month then show the row; except If Date Loan Booked is older than current month and Antic Dep$ is zero then hide the row; but If Date Loan Booked is older than current month and Antic Dep$ is not zero then show the row;
Phew! That probably makes no sense but i had to try.
Once again, i appreciate any help so that i can keep the remainder of my hair.
I am trying to do a date query with conditions in excel but it don't seem to work.
I am trying to do a query on a table on the birthdate column and I need the records of all athletes that were born on or after 1/1/2008. Below is what I did but it doesn't seem to work.
Created a design view chose the birth date field and the criteria row I typed >=#1/1/2008#
I have a parameter query with a totals row that displays averages. Is there a way to have the average row use only specific records in its calculation based on one of the field's values WHILE still displaying all the records returned by the query.I want only data that has a "YES" value used in the average while still displaying the records marked as "NO"
I want to create a calculation query that uses different equations under certain conditions. Here's specifically what I need:
If the "Cost_Category" field is "Full Price" then the query uses the following calculation: Total_Cost: Sum(nz([Program_Cost])+nz([Millage_Fee])+nz([Auditorium_Cost]))
If the "Cost_Category" field is "BOCES" then the query uses the following calculation: Total_Cost: Sum(nz([BOCES_Number_of_Participants])*nz([Cost_Per_Person]))
I have successfully created these two queries individually, but combining them doesn't seem to work. Here's what I wrote:
It keeps coming up with errors, saying that I misplaced a comma, parenthesis or quotation. I've tried playing with it, changing the syntax slightly but it doesn't seem to work.
Basically, if Calendar date > Date(), if Calendar Date not Saturday or Sunday, weekday(Calendar date<>1 and <>7), AND Calendar Date not in (Holidays table).Then repeat the last not = 0 value of MyValue. I thought of changing the default value but the value is already 0, while default is null + I need to set the default value under certain conditions.
Please could someone give me help on this topic, I need to slove it for coursework in Access but im having the following problem.
Im creating a database for a hotel which rents out its room obviously. The problem i have is if a guest books a room for say march 3rd until march 6th, theres currently no way in which to stop another guest booking the room for any of these dates.
I think i know how to stop double booking for the start day, but not the days inbetween if you understand. The database has 3 tables: Guest Info Room info Bookings
If anyone can help it would be greatly appreciated.
P.S the method i hope to use, is the hotel will enter the start date of a guests stay and then enter the number of nights the guest is staying for e.g. 3rd-6th of march would be input as: Begin date: 03/03/08 for:'3' nights.
I have been asked to ceate a customer booking database for the computer stations and my mind has gone a complete blank. I have all my other tables but just can't think how to do it. I have 10 computers and they are booked hourly, Monday to Friday but each day finishes at a different time.
Can anyone please help I'm suppose to have it done by Monday. :eek:
I am in the process of creating a Room Bookings database using the limited graphical tools of Access 2003. I intend to break up the day from 0700 to 1900 into 48 X 15 minute chunks (the minimum bookable time) and have these graphically represented on the form as boxes whose colour change depending on whether it is booked and who by. It would be normal to have up to 8 colours available for this as any one room would be unlikely to be booked by more than 8 people in one day. I would envisage that each day would be covered by a separate subform.
Has anyone else tried a graphical representation of a booking form?
It would be interesting to hear others views or experiences...
Hi I have a database which uses a form to book appointments, new or existing customers are booked in this way, or not as this case may be. I have designed the form with my three options to book someone in, that are a Date, a Time and the treatment.
My date is taken from tables containing the appropriate dates for any Monday, (No Tues) another table for Weds etc until Sat for the next 4 years My Time is taken from one table containing appropriate times in the day. My Treatment is taken from a table containing a list of treatments.
How can I book an appointment without duplicating dates and times? How can I produce a list of these bookings either daily, or weekly to forward these details via Microsoft Outlook? I hope I am not asking for too much as I have been trying to do this on my own now for a while and have searched the board. I have got this far so I don't want give up now. Many Thanks Bern :confused:
I am wanting to prevent a double booking. I have a form called:
frm_Booking which records an ArrivalDate and DepartureDate
and another form
frm_Building_Booking which records a BuildingID number
I want to ensure that a customer cannot book a BuildingID for an ArrivalDate and DepartureDate it it has already been booked by another cusotmer or book any on the days between.
However a customer should be able to book a BuildingID on the DepartureDate.
I used to queries ,1 to get items that are taken ( its all about sign in sign out for equipment) and other query is list of all items. How can i make 3rd query which will give me all but taken items from query1? (of course items from query 1 are in query2) thx in advance
For work i need to create a computer booking form so that people can book out computer rooms 2 weeks in advance and the perminant bookings are always in there etc etc... most of it i have sorted but what i want is for a query that can run and go to todays date and then only bring up the results for the next 2 weeks.
Is there anyone that could help me out with doing this because im at bit of a loss and its doing my head in :confused:
Any other comments or suggestions are welcome too if there is a better way of doing this.
could someone please help me, i am having a problem trying to get rid of double bookings in the attached database.
This database is for an assignment for my students, and unfortunately i had got the point now that i have got incredbily stupid and cannot see a solution.
I want to make sure that a client cannot double book an instructor and a car on a specific time or date...
Obviously i would also want to make sure that if one client has booked a specific car or instructor no other client would be able to book it, in the same time and date slot.. All lessons are 1 hour long
for some reason i have to make sure that a client can book a specific car... This unit is being taught alongside another unit by another teacher, who does not see the complexities of the problem, and insists that this complexity is in the database, however they do not know the solution either.
I have tried creating different types of primary key combinations, but that does not work..
Any ideas or suggestions would be greatly appreciated
I have been tasked with creating a system for booking instructors with clients. Customers will book in for a lesson which can be anything from 30 mins to three hours long in half hour chunks. There are up to seven instructors available and I need to be able book up to six months in advance and hopefully display a daily screen with a grid showing who is booked out with who at various time of the day. Can anyone suggest some piece of freeware or example database to get me started?
Hello everyone, if anybody could help me I'd deeply appreciate it.
Booking ID = the time when it is booked over the phone Hiring ID = the time when the event is to be held
Basically I have to make some booking dates, and use January and February 2006 as test data. My only dilemma is it says that the booking dates must not be booked more than 8 weeks before the hiring, and at least 1 week before it. So if someone wanted to the hiring for 01/01/06, then they wouldn't be able to book before 01/11/05, but before 25/12/05. Can anybody help me? Thanks. I need it so that whatever the hiring date is, the booking date has to be no more than 8 weeks in advance, but 1 week before the hiring.
Firstly can i say Hi to everyone on this board amazing I registered today because it took this board 3 search to answer a problem Iv had for 2days now. So big thank you !!
No then Im creating a small website where members are capable of booking the Venue via the website. At the moment my databse consists of Members_tb with attributes
I am hoping someone from this board can help me by shedding some light as to how they would go about empowering a Member to book the venue for a particular date also taking into note not to book for a date the venue is already booked for.
Any help at all will be so much help. Im just confused as to how i should tackle this issue
Consultants need to be able to log-in when they are available and be put in rotation. Agents need to be able to select the next available Consultant. I also need there to be a waiting list. I would like to be able to run reporting on Time on Waiting List, Time with Consultant, etc.
Is there a simple way to do this? I would appreciate if someone could point me in the right direction.
I have been asked to research and then produce a simple seat booking system for a movie showing in a small lecture theatre using MS Access. I'm a relative Access newbie and have had little luck in finding information on how to go about producing this system.
If anyone could provide or link me to anything which could be of use that would be great.