Results 1 to 5 of 5

Thread: Scheduling Tables and Relationships question

  1. #1

    Thread Starter
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,121

    Scheduling Tables and Relationships question

    I am in the process of creating a scheduling application in vb.net, I am using MS Access as the backend.

    Simple scenario:
    1. the boss puts a blank schedule on the desk
    2. staff select the days they want to work
    3. she then uses my app to assign staff to the days
    4. previews and verifies schedule
    5. prints out in an excel format


    Application layout: a Month Calendar is used to select the start date of a 28 date range. Saves the Start Date and the End Date to textboxes. The 28 day date range (just the day, Oct 1, 2010), 1 is saved as the text property of a checkbox control. She then selects the checkboxes of the days the staff wants to work.

    Data that needs to be saved:
    1. Start Date
    2. End Date
    3. Date Range
    4. Employee ID
    5. Days Selected


    Current Tables and Relationships

    Name:  tables.JPG
Views: 121
Size:  48.1 KB

    Am I going about this the right way or does this need to be changed?
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  2. #2
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Scheduling Tables and Relationships question

    Instead of storing all the Days in a single row I would store one per row; DayNumber (1-28). Omitting the row if the employee is not scheduled. If more than one employee is scheduled, then there will be that many rows. I don't know what tblDates is for. You can always calculate the date on the fly.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Scheduling Tables and Relationships question

    I'd have an employee table... and a selecteddates table.... the employee table is self-evident, so I'll skip it, but the selecteddates table would have the emplID (int, FK to employee table) and a selectedDate (datetime) .... and that's pretty much it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,121

    Re: Scheduling Tables and Relationships question

    MarMan : tblDates is for the range betewwn Start and End tblDays is the days the employee selected.

    TechGnome: guess KISS works here huh, will give it a try.
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  5. #5

    Thread Starter
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,121

    Re: Scheduling Tables and Relationships question

    OK if I do it as techgnome suggested, I would have a selectedDate table;

    tblSelectedDates
    SelectedDateID
    StaffID
    StartDate
    EndDate

    then I can loop through the range of dates to set controls, and to populate a DGV to preview the schedules I only have to worry about filling the DGV by either StartDate to view all staff scheduled for that period or StaffID to see all schedules for that employee, right.
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width