Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2021
    Posts
    3

    Calculating values in a field without a consistent expression

    I am currently trying to update my company's training log which is stored in access and am looking for some assistance. Two of the fields in the table are [Train Date] and [Expiration]. Unfortunately, most of the time [Expiration] has been left blank and I am seeking to add training expirations where necessary. To complicate this, some trainings expire after 1 year, some 3, some 5, and some do not expire at all so I am not able to make 1 change across the board with a calculated field or something of the sort. Is there any way that I would be able automate the process (with a query maybe?) so that I can, for example, add an expiration of 3 years after train date for all forklift trainings? I am not super fluent in access so if there is a simple fix that I am overlooking, that'd be awesome.

    Thanks in advance!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Do you have a list of Training Courses/Sessions?
    Who determines how long the training credit is "good for"?
    There must be some business rules or training courses and how they apply to your org somewhere.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    Do you have a field in a table that specifies the duration that the training is valid, and is it consistent in terms of the units of time? That is, it doesn't say 3 years in one record and 6 months in another.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    Nov 2021
    Posts
    3
    Quote Originally Posted by orange View Post
    Do you have a list of Training Courses/Sessions?
    Who determines how long the training credit is "good for"?
    There must be some business rules or training courses and how they apply to your org somewhere.
    1) Fields in the table in question are [Man Number], [Course Name], [Instructor], [Train Date], and [Expiration]. I have an additional table which lists all of the training courses which is linked to [Course Name].

    2) How long a training credit is good for is as determined by OSHA/the training organization

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi

    You said you have:- "I have an additional table which lists all of the training courses"

    If this table is called tblTraining.

    You just need to add a field named "DurationInMonths" - make its DataType - Numeric

    Add in all of the Durations and then you can use this value to automate the ExpirationDate
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  6. #6
    Join Date
    Nov 2021
    Posts
    3
    Once I added a "DurationInMonths" field to the training table, could you explain more in detail how I would automate ExpirationDate?

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi

    OK On your Form where you add details of Course Taken you would have the following:-

    1. Combobox to select the Coursename together with the DurationInMonths - name this Combobox "cboCourse"

    2. An Unbound textbox named "Duration" you would use the following to get the DurationInMonths Value - =[cboCourse].Column(2)

    3. Control to Enter the TrainingDate

    4. An Unbound Control where you would use the following to work out the ExpirationDate - =DateAdd("m",[TrainingDate],[Duration])

    If you can upload your database I can give you an example.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 12-03-2014, 11:34 AM
  2. Replies: 5
    Last Post: 04-25-2014, 01:17 PM
  3. Replies: 11
    Last Post: 03-31-2014, 03:15 AM
  4. Replies: 3
    Last Post: 03-27-2014, 08:11 AM
  5. Replies: 1
    Last Post: 09-27-2013, 09:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums