Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / October 2006

Tip: Looking for answers? Try searching our database.

Making a date unavailable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
feeman - 30 Oct 2006 16:13 GMT
Not sure if this is possible but I am working on a database, that
requires the following function.  Be able to book a job in for a given
week of the year, and this then becomes unavailable for anyone else to
book the same week.
I need to be able to do this for multiple people, so they do not get
double booked for jobs.

Anybody got any ideas.
Kc-Mass - 30 Oct 2006 17:25 GMT
How about a table with fields of WeekOfYear, Employee, Booked, BookedFor
You would populate the db fields of  WeekOfYear and Employee.  Also
initialize Booked to False And BookedFor  to "".   As you book a week for an
employee change Booked to True and fill in Booked For with the
purpose/Client.
You could then query for weeks available for employee X.

In the alternative you could just record the bookings ( all fields) as they
occur and do some dateMath to figure out what is open.

> Not sure if this is possible but I am working on a database, that
> requires the following function.  Be able to book a job in for a given
[quoted text clipped - 4 lines]
>
> Anybody got any ideas.
pietlinden@hotmail.com - 31 Oct 2006 17:50 GMT
> Not sure if this is possible but I am working on a database, that
> requires the following function.  Be able to book a job in for a given
[quoted text clipped - 4 lines]
>
> Anybody got any ideas.

I would start by reading Albert Kallal's notes on this.  He's done a
LOT of the heavy lifting for you.  If you are _always_ booking full
days, then this is simple.  This works if your rule is:

A person can be assigned at most one job for a single week of the year.

If you have a table
tblBooking(PersonID, WeekNo, Year)

'--apologies for the Oracle syntax, but you get the idea)
CREATE TABLE Booking(
PersonID   INTEGER     NOT NULL,
WeekNo   INTEGER     NOT NULL,
Year         INTEGER     NOT NULL,
PRIMARY KEY (PersonID, WeekNo, Year),
FOREIGN KEY PersonID REFERENCES People(PersonID)

Then the compound primary key creates a unique index (no duplicates) on
the 3 fields.  So you can't insert a duplicate no matter how hard you
try.  So once the date is chosen, you can't choose it again.  You could
also use comboboxes that get their data from select queries that
eliminate unavailable days.  Depends on how your form is set up.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.