Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2005, 10:20 PM
Authorized User
 
Join Date: Jan 2005
Location: Pinckneyville, IL, USA.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mnoon Send a message via MSN to mnoon Send a message via Yahoo to mnoon
Default Scheduling database ...

I have a scheduling database problem. The database table contains employees, dates, start times, and completion times.

However... I need the start times to synch up with specific slots.
  8-10, 10-12, 12-2, 2-4, and 4-6. And insert this data into a viewing table.

If the start time and is within the slots, and the end time is within the slots, I would like the slots to be updated for each employee. If not.. I would like the slots to stay empty.

If there an easy way of doing this?

This is the format...

employee1 8-10 empty
employee1 10-12 empty
employee1 12-2 busy... customer info
employee1 2-4 busy... customer info
employee1 4-6 empty

employee2 8-10 busy customer info
employee2 10-12 busy customer info
employee2 12-2 busy another customer info
employee2 2-4 empty
employee2 4-6 busy still another customer info

What would be an easy way of doing this without programming a hundred for loops, and if then statement.

Regards,


Marc Noon

Coding is a game. Live it, love it, break it, run it.
__________________
Marc Noon

Coding is a game. Live it, love it, break it, run it.
Reply With Quote
  #2 (permalink)  
Old January 31st, 2005, 09:27 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It seems to me that you don't want to store all these empty slots in a table. Perhaps you want to make a junction table and give an employee an assignment, like:

tblEmployee
EmpID
FirstName
LastName
SSN
etc

tblSlots
SlotID
SlotTime

tblSlotDesc
SlotDescID
SlotDesc

tblJunction
AssignmentID
FK tblEmployee
FK tblSlots
FK tblSlotDesc

Then just do a query and make a report. In the report, make room for all your slots. The most code you would need would be on the Reports Detail On Format Event like:

If IsNull(Me.SlotTime) Then
   Me.SlotTime = "Empty"
End If

Use the report instead of your "viewing table."

HTH


mmcdonal
Reply With Quote
  #3 (permalink)  
Old January 31st, 2005, 06:25 PM
Authorized User
 
Join Date: Jan 2005
Location: Pinckneyville, IL, USA.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mnoon Send a message via MSN to mnoon Send a message via Yahoo to mnoon
Default

What exactly would the query look like. I was not able to get your solution to work. I thought this was going to be a simple problem, but it has become a chore.

I think I need a table b/c I need to select a row or rows and update the data to correspond to the update.

So far my solution is a Kludge of lstBoxes and for next loops.

Regards,

Marc Noon

Marc Noon

Coding is a game. Live it, love it, break it, run it.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catalog scheduling riketa.garg SQL Language 0 April 8th, 2008 12:56 AM
Scheduling mwahab Excel VBA 0 February 23rd, 2007 02:24 PM
Distributed Database scheduling algortithm skc SQL Server ASP 0 May 10th, 2005 06:51 PM
Scheduling mrkyn Classic ASP Basics 4 December 1st, 2003 03:11 PM
time scheduling rudjung SQL Server 2000 3 November 20th, 2003 10:32 AM



All times are GMT -4. The time now is 04:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.