Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Location
    Australia NSW
    Posts
    6

    Question Unanswered: Help with Timesheet

    Hi Forum
    Im a nwbie to Access and to this Forum so pleas be patciant.
    I have set my self a project to create a timesheet type DB.

    Program (MS Access 2003)
    Table Name (TTimesheet)
    Field Name (ID, Commencing data, Date, Cost Code, Subject, Description, Start Time and Stop Time)
    Form Name (FTimesheet)

    What i would like to automate the Commencing Date in the Table so that it always states the first Monday of the month e.g. Mon 1/05/2006.

    I would like to do is it automate Date will state the current date of entry.=Date()

    I would like to automate The Start Time & Stop Time to give me a entry as Hours.

    I would like to output this info to an Excel file.
    Pleas Help

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    theres a whole lot of issues there
    lets take a step back

    first off table design. Access is very (in my view too) forgiving in how you name your tabels and columns within tables. There are some reserved words that you shouldn't use (like DATE, DAY, WEEK etc... theres a fuller list here.
    a general comment try not to use spaces in your column names its a pon later on when designing queries
    I'd also try to compress your column names so they take up less space, and try to group accroding to type. Its personal preferance but genrally I'd use soemthing like
    CostCode, Subject, Desc, StartTime and StopTime
    I'd give the ID column a usefull name eg TimeSheetID (then you can automatically relate the ID to the specific column

    I suspect you have a few design wrinkles to sort out aas yet with the tables

    gettign the first monday in th emonth is realtively easy
    you can write a function in VBA which gives the first monday in the month. have a look at the weekday (I think) function. effectively your function will require a date passed to it (could be an optional parameter so that if noi supplied it uses the current month / date)
    the function then checkes to see if the first of the month was a monday, and if not uses then uses the return form the weekday fucntion to find the first monday in the month. the fucntion should return the first day of the month as a date value.

    as reagrds automation, now tha could be a tricky one. what actually are you automating.
    its quite easy in access to have soemthing which starts and stops and records the time, or elapsed time. the problkem is often ensuring that the timings aren't overwritten by subsequent users.

    for example you could use a button which when pressed records the current time [now() I think], if you already had a start time then you could assign it to the finish time, if not it becomes the start time.

    you will need to think how you will handle users being deliberately awkward (eg not pressing the stop button as expected (you may need to look at how to handle Access or the form closing unexpectedly)) you need to handle how a user may may not prerss the stop button at all. ie how do you handle timesheet tasks which are open IE not yet closed with a stop time)
    exporting the results to excel will proabbly be the least of your problems there are standard tools which can export a query, or table in an excel file format, or you could pull the data accross using VBA in excel.

    perhaps you may want to guive a little mor ethought to your requirements before diving into designing you apllication.

    hth
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2006
    Location
    Australia NSW
    Posts
    6
    Thanks for the help healdem
    I will look at what i require before diving in

  4. #4
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Quote Originally Posted by healdem
    first off table design. Access is very (in my view too) forgiving in how you name your tabels and columns within tables. There are some reserved words that you shouldn't use (like DATE, DAY, WEEK etc... theres a fuller list here.
    a general comment try not to use spaces in your column names its a pon later on when designing queries
    I'd also try to compress your column names so they take up less space, and try to group accroding to type. Its personal preferance but genrally I'd use soemthing like
    CostCode, Subject, Desc, StartTime and StopTime
    I'd give the ID column a usefull name eg TimeSheetID (then you can automatically relate the ID to the specific column
    Sounds like a good candidate for the FAQ's/Read me First.
    Chris

Posting Permissions

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