Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access Query
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access Query

 Post Reply Post Reply
Author
hockenpj View Drop Down
Groupie
Groupie
Avatar

Joined: 10 February 2003
Location: Belgium
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote hockenpj Quote  Post ReplyReply Direct Link To This Post Topic: Access Query
    Posted: 07 October 2003 at 8:09am

Hi,

I am in the process of developing an Access Database for Resource Scheduling project I have.  I am not going to use a web interface, just run it straight from Access.

The problem I have at the moment is trying to create a query that will change depending on the times and dates.

The database is quite simple other than that. I will have the following table strucutures:

TableCustomers
CustomerID
FirstName
LastName
etc...

TableJobs
JobID
JobName
CustomerID
VenueID
JobStartTime
JobEndTime
JobStartDate
JobEndDate

TableVenues
VenueID
VenueName
VenueDescription

TableJobDetails
JobDetailsID
JobID
EquipmentID

TableEquipment
EquipmentID
EquipmentTypeID
EquipmentMake
EquipmentModel

TableEquipmentType
EquipmentTypeID
EquipmentType

I will have a forms that will:

  1. Let me add a customer (FormNewCustomer)
  2. Let me a new job (FormAddNewJob)
  3. Let me allocate equipment to a job (FormAddEquipmentToJob)
  4. Let me add a new venue (FormNewVenue)
  5. Let me add new equipment (FormNewEquipment)
  6. Let me add a new equipment type (FormNewEquipmentType)

With regards to my problem metioned above, FormAddEquipmentToJob is the most relavant. This form will be a form with the information about the equipment and a subform where I can allocate any equipment that is available during the time and date period outlined in the top part of the form.

So the query required to do this needs to take the dates and time from the top part of the form to create a list of available equipment.

If you have any suggestions that would be great!

I am sure that I am missing something in the way the table have been strucutured.

Back to Top
anandsoft View Drop Down
Newbie
Newbie


Joined: 21 June 2003
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote anandsoft Quote  Post ReplyReply Direct Link To This Post Posted: 07 October 2003 at 8:59am
hello, What I understand is that you need to select a query based on time and date displayed. I think you need to do this programmatically. That is writing the code (or script) such that the right query is selected depending on the time and date.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 07 October 2003 at 9:56am

Should not be too hard to do, basically you could use the raw script below and just adjust it to your needs, hope it helps you on the way...

Select EquipmentID, EquipmentType, EquipmentMake, EquipmentModel from TableEquipment e
INNER JOIN TableEquipmentType t ON e.EquipmentTypeID = t.EquipmentTypeID
WHERE NOT EquipmentID IN
(
Select EquipmentID from TableJobDetails d JOIN TableJobs j ON d.JobID = j.JobID
WHERE NOT 'thedatefromyourform' BETWEEN j.JobStartDate AND j.JobEndDate
)



Edited by michael
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.