Need to update a value for a field depending on Month number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ferguslang
    New Member
    • Jun 2013
    • 1

    Need to update a value for a field depending on Month number

    Hi

    I am trying to find a solution to the problem I wish to be able to update a particular fields depending on the value =month(date()). I wish user to input hours worked that month on future months depending on value in form. My boss only wants the data to start from todays Month fand dat entred for next three months, so if june we update Month6, Month7, Month8. I know could use a case statement but ther must be a more elegant solution which would append the month no to "[Month]" to update the correct filed
    Last edited by Ferguslang; Jun 28 '13, 12:48 PM. Reason: Incomplete
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    It sounds like you are suffering from a lack of database normalization. Here is a link that will help you design your tables so that your problem will disappear: Database Normalization and Table Structures. The specific problem that I see with your design is that you have a separate field for each month. These need to be combined into one field. A query can then be used to view the data separately or just to add up the hours for a specific month.

    Comment

    Working...