Results 1 to 7 of 7
  1. #1
    DBID10T is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    46

    Help Address Table

    I have:
    tblAddress
    AddressIDpk
    AddressTypeIDfk
    CustomerIDfk
    VendorIDfk
    EmployeeIDfk
    AddressLine1


    AddressLine2
    ect
    ect

    My question is when a FK is put in any of these 3 CustomerIDfk,VendorIDfk,EmployeeIDfk I want the remaining 2 to lock. IN essence Locking that AddressIDpk to a specific vendor customer or employee

    Or am i going thru a lot of nonsense to just cut out the vendor and employee address tables?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You would 'lock' these form fields since editing directly in tables is not kosher. If that's what you're doing, there is no way to lock fields at the table level.
    I don't understand your second question. "Locking" fields has something to do with eliminating tables? Unless a vendor or employee can have more than one address, I don't see why you'd have separate tables for their addresses.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Employees can have 2 or more addresses? If no, then I would have the address in the Employees table.

    Vendors can have 2 or more addresses? If yes, I would have an table for Vendor addresses; otherwise the address would be in the Vendors table

    Customers can have 2 or more addresses? If yes, I would have an table for Customer addresses; otherwise the address would be in the Customers table

    Don't know what "AddressTypeIDfk" is used for......??



    My 2 cents.........

  4. #4
    DBID10T is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    46
    Thanks for the replies I see what you mean.

  5. #5
    DBID10T is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    46
    Quote Originally Posted by ssanfu View Post
    Employees can have 2 or more addresses? If no, then I would have the address in the Employees table.

    Vendors can have 2 or more addresses? If yes, I would have an table for Vendor addresses; otherwise the address would be in the Vendors table

    Customers can have 2 or more addresses? If yes, I would have an table for Customer addresses; otherwise the address would be in the Customers table

    Don't know what "AddressTypeIDfk" is used for......??



    My 2 cents.........
    AddressTypeIDfk is the foreign key from tblAddressType

    tblAddressType
    AddressTypeID
    AddressType

    I use it to allow for billing addresses and multiple addresses for commercial clients with multiple branches

    tblCustomerAddress
    CustomerAddressID
    AddressTypeIDfk
    {address infos}

  6. #6
    Join Date
    Apr 2017
    Posts
    1,673
    One possible way is to have an addresses table, and all other tables where addresses must be linked to refer to this table. I.e. addresses of employees, vendors or customers are all registered there.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

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

Similar Threads

  1. Replies: 4
    Last Post: 01-06-2018, 03:26 PM
  2. Replies: 7
    Last Post: 06-27-2016, 12:28 PM
  3. Replies: 2
    Last Post: 08-22-2013, 12:02 AM
  4. Replies: 1
    Last Post: 10-07-2009, 08:15 AM
  5. Input Mask for an IP Address and Mack Address
    By baksg1995 in forum Access
    Replies: 18
    Last Post: 06-23-2009, 12:33 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