Results 1 to 2 of 2
  1. #1
    Crystal is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2022
    Posts
    1

    If, Then, Else

    I use a table in access to track production of items as they move through each department, with each column heading being the department name, and the value in each field being a date of completion for that department. I would like to have a new column, called STATUS, and a second one called STATUS DATE, where the STATUS field contains the last department with a date value, and STATUS DATE contains the actual date. In other words, I have items, BLUE, RED, GREEN, AND YELLOW, and I have departments, A, B, C, D. I want to be able to look at item BLUE and see that the current status is C, and the status date is whatever date. Can anyone help please?



    As a side note, I have accomplished this in Excel by using the IFS formula in Excel, where it checks whether one or more conditions are met, and returns a value corresponding to the first true value.

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    It sounds like your table is not normalized, it sounds like what's referred to around here as 'excel brain'. That's not a knock it's just that access and excel handle these kind of tasks differently.

    Using your example you should have
    1. an items table
    2. a departments table
    3. a junction table that links an item to a department, also with a date

    Then you would simply run a query and get the latest department and date for an item

    Click image for larger version. 

Name:	Untitled.png 
Views:	22 
Size:	27.3 KB 
ID:	47176

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

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