Results 1 to 6 of 6
  1. #1
    Laaacux is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    3

    Question Table design or query or?

    Hi,
    I am bit new at MS access, but trying to learn it more...
    I stuck at thing where I need compare 2 table data in 1:
    Example:

    I have 2 tables:

    Customer:
    1. Customer_ID:
    2. Customer_Name:

    Address:
    1. Customer_ID:
    2. Customer_Address:
    3. Address_Type:

    Now I have to make table Nr. 3:

    Where:
    1. Customer_Name: ("link" to Customer)
    2. Address_Type: ("link" to address)
    3. Delivery:

    But: when you choose 1. (Customer_name) in second line (Address_Type) you see only those related address types, not all.



    Is it possible to make it?
    I just have no idea..

    Thanks in advance,
    Elviss

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I don't understand what you are trying to do. From what I can tell you have customers and each customer can have many addresses and each address is a particular type. I would design the tables as follows

    Customer
    -Customer_ID primary key, autonumber
    -Customer_Name:

    Address
    -pkCustAddressID primary key, autonumber
    -Customer_ID foreign key to Customer table, long number field
    -Customer_Address
    -fkAddressTypeID foreign key to tblAddressTypes

    tblAddressTypes
    -pkAddressTypeID primary key, autonubmer
    -txtAddressType


    Now if you want to see a customer with all of their address types, you would use a query.

    Now if you want to track deliveries to your customers, you would need another table.

    tblDeliveries
    -pkDeliveryID primary key, autonumber
    -fkCustAddressID foreign key to Address table
    -dteDelivery (date of delivery)

    If you want to see all of the details of the delivery (customer name, address and address type) you would bring all of the tables together in query and select the fields you want to see.

    I'm not sure if that is what you are trying to do, so you'll have to provide some additional details.

  3. #3
    Laaacux is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    3
    Thanks for your answer, it helped a bit,
    But what I needed is:

    Example:
    Customer: Tieto have 3 address ( A,B,C in table address)

    So in that last table I want:
    1. Choose Customer Tieto
    2. Choose Tieto address B
    3. Write delivery date

    Rule is that in the step 2. I see only Tieto address not other which are listed in table 'address'.

    Ok, but looks like I have to do it into forms with Row Source and Control Source.. somehow and then after each update in field 1. make auto refresh

    OK, thanks.. I am sorry, if I have so bad English...

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    [QUOTE]So in that last table I want:
    1. Choose Customer Tieto
    2. Choose Tieto address B
    3. Write delivery date
    QUOTE]

    You would actually do this in a form. The form would be bound to the delivery table I showed in my last post.

    What does Tieto mean?

    What is address B mean. Is address B the shipping address of the customer? If so, can a customer have many shipping addresses?

  5. #5
    Laaacux is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    3
    Tieto is Customer name ( see www.tieto.com ) )
    B is shipping address and yes one Customer can have a lot of shipping addresses (Hamburg, Berlin, etc.)
    I just made that in a form:
    1. I choose customer "Tieto" in field "Customers"
    2. After update field "Customer" is going "Me.Refresh"
    3. Choosing one of Tieto shipping address (A/B/C/D) in field "Customer address"
    ...
    etc.
    Hmm, yess... Access is big programm...

  6. #6
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    So, were you able to resolve your issue?

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

Similar Threads

  1. please help to design a table
    By oas in forum Database Design
    Replies: 3
    Last Post: 02-11-2012, 08:54 AM
  2. Replies: 1
    Last Post: 12-20-2010, 09:09 AM
  3. Table Design for Query Function
    By Desstro in forum Database Design
    Replies: 1
    Last Post: 09-13-2010, 04:38 AM
  4. table design: one big table vs. multiple small tables
    By lstairs in forum Database Design
    Replies: 3
    Last Post: 12-31-2009, 08:46 AM
  5. Table design problem
    By wasim_sono in forum Database Design
    Replies: 0
    Last Post: 04-08-2009, 06:21 AM

Tags for this Thread

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