Results 1 to 3 of 3
  1. #1
    stevenyp is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2009
    Posts
    2

    Post mapping problem?

    hi,
    It seems like simple, but I can not figure it out.
    If anyone know how to do it,pls help me out.
    The problem is like following.
    I hv two table one for Style and another one for OrderDetail.
    Style table look like

    Style Color SIZECODE SIZE1 SIZE2 SIZE3 SIZE4 SIZE5 SIZE6 SIZE7
    AAA white AB 28 29 30 31 32 33 34
    BBB gold W23 23 24 25 26 27 28 29
    CCC silver CC 28X30 30X30 32X32 34X32 36X32 32X34 34X34

    OrderDetail look like

    Style Color SIZECODE QTY1 QTY2 QTY3 QTY4 QTY5 QTY6 QTY7
    AAA white AB 10 20 30 50 30 20 10

    i would like to do is when the orderDetail forms opens
    OrderDetail get a value(size like 24 for qty1) from style table, so i can see the forms look like following



    Style Color SIZECODE 28 29 30 31 32 33 34
    AAA white AB 10 20 30 50 30 20 10
    pls help to complete this job.

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Your structure is all wrong, if I may suggest. Each product should have its own id irrespective of size, therefore you need a products table that has the following basic fields

    ProductId - Primary Key (Autonumber)
    ProductCode - Unique
    ProductGroup/Style - FK > Stype/Groups Table
    ProductColour - FK > Colours Table
    ProductDesc
    ProductSize
    ProdCost
    QuantityInStock

    Therefore for each item, lets say t-shirts, you would end up with the following

    ProdId :1
    ProdCode:TSG24
    ProdGroup:2 (2 = T-shirt)
    ProdColour:3 (3 = Gold)
    ProdDesc:Gold t-shirt (this could be derived in a query)
    ProdSize:24
    ProdCost:£5
    QtyInStock:50

    ProdId :2
    ProdCode:TSG26
    ProdGroup:2 (2 = T-shirt)
    ProdColour:3 (3 = Gold)
    ProdDesc:Gold t-shirt (this could be derived in a query)
    ProdSize:24
    ProdCost:£5
    QtyInStock:40

    ProdId :3
    ProdCode:TSG28
    ProdGroup:2 (2 = T-shirt)
    ProdColour:3 (3 = Gold)
    ProdDesc:Gold t-shirt (this could be derived in a query)
    ProdSize:28
    ProdCost:£5
    QtyInStock:10

    etc

    Now you can run queries to get information as you requrie.

    David

  3. #3
    stevenyp is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2009
    Posts
    2

    Re of Reply

    Thank you for the tip.
    By the way, what I would like to do is I would like to change the size column head dynamically based on size category selected when form is opened. Can you give me more tips to solve this problem please? To be more specific, I would like to substitute qty1, qty2, qty3 etc to either 28,29,30,31 or 23,24,25,26 depend on size category selected, when opening the form.

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

Similar Threads

  1. query problem i have a problem wi
    By maxx3 in forum Queries
    Replies: 0
    Last Post: 06-29-2009, 02:29 AM
  2. form - subform field mapping
    By nqirar in forum Programming
    Replies: 2
    Last Post: 03-02-2009, 01:49 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