Results 1 to 2 of 2
  1. #1
    sdmikejr is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    3

    DLookup, IIF, or different design for what I am trying to accomplish?

    Hello everyone,
    I really need help solving a problem that is new to me (hopefully not to you all).

    So I built a simple product planning tool in Excel and need to implement it into access. I have 2 tables, a product table and a lifecycle table.

    The product table has the following:
    Product Name
    Product Life Exp. (this is years, in number format)
    Annual Peak Volume

    Example data:

    ProductName Peak Annual Volume Product Life Exp.
    Product 1 6000 3


    The second table is lifecycle table:
    LifeCycleID
    Life (years)
    Volume (decimal number)



    LifeCycleID LifeCycle(Years) Peak Multiplier
    3-1 3 1 0.500
    3-2 3 2 1.000
    3-3 3 3 0.500
    2-1 2 1 0.650
    2-2 2 2 1.000
    1-1 1 1 1.000


    The objective here is to be able to run a query that shows years 1, 2 and 3 that takes the annual peak volume in the lifecycle table and multiplies it by the multiplier based on the year of the life cycle, as a result, Product 1 would give us 12K over 3 years based on the life cycle.

    Year1 Year2 Year3
    Product 1 3,000 6,000 3,000

    I added a lifecycle ID field to the second table as I was trying to figure a way to use relationships...but I am not sure this would work and if I would even want to attempt going down that rabbit hole.

    Any Ideas here would greatly be appreciated.

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I can make no sense out of the structure or target example you posted. What I think you should do is review normalization and naming conventions (3-1 is a poor identifier and you should not have parentheses in names) and then post back with a narrative on what the business entails if the suggestions don't help you with design. Often, starting out with what you have leads down some path that should be avoided because it's not properly designed. Not saying for sure that is the case here, but I suspect as much.
    http://rogersaccessblog.blogspot.ca/...on-part-i.html
    and/or
    http://holowczak.com/database-normalization/

    One source about how to name things - http://access.mvps.org/access/general/gen0012.htm
    What not to use in names - http://allenbrowne.com/AppIssueBadWord.html

    About Auto Numbers
    - http://www.utteraccess.com/wiki/Autonumbers
    - http://access.mvps.org/access/general/gen0025.htm

    The evils of lookup fields - http://access.mvps.org/access/lookupfields.htm
    Table and PK design tips - http://www.fmsinc.com/free/newtips/primarykey.asp
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Table Design -- want to avoid a design that creates blank fields
    By snowboarder234 in forum Database Design
    Replies: 4
    Last Post: 10-08-2012, 10:13 AM
  2. Most Efficient Way to Accomplish Task
    By cc143most in forum Access
    Replies: 2
    Last Post: 08-24-2012, 02:17 AM
  3. best way to accomplish this (aggregate tables)
    By TheShabz in forum Queries
    Replies: 7
    Last Post: 12-27-2011, 05:42 PM
  4. Form Design Question with DLookup (newbie)
    By wongc61 in forum Access
    Replies: 4
    Last Post: 07-08-2011, 03:22 PM
  5. Will access accomplish this?
    By Andy128 in forum Access
    Replies: 1
    Last Post: 07-10-2010, 01:47 PM

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