Results 1 to 7 of 7
  1. #1
    Padawan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2011
    Posts
    5

    Table creation advice

    Hey all, super newbie here. I am using Access 2007 to create a network circuit tracking database. I have two tables [Circuit] and [Segment]. There are two segments per circuit. The Segment table lists the connection details for that segment. The Circuit table then lists the segments that comprise that circuit.

    Circuit
    Circuit.Name - primary key
    Circuit.1 - lookup field, Segment.Name of 1st segment
    Circuit.2 - lookup field, Segment.Name of 2nd segment

    Segment
    Segment.Name - primary key
    Circuit.Name - lookup field, key field from Circuit
    Segment.A - one end of the segment
    Segment.Z - the other end of the segment



    What I am trying to do is as I enter new records in Circuits, the lookup field for Circuit.1 and Circuit.2 only show those records that are not already present in the Circuit table.

    I thought I might be able to use a Query for the lookup field, but it doesn't look like it. And I need the information to remain in the Circuit table even after it is removed from that query lookup.

    Any help is appreciated

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    you don't want to lookup in both directions.

    if the Circuit table has the two look ups of segments. that's fine. you do not put any look up into the segments table back to circuits. this presumes that the segments table is a static list that has a sole purpose of providing info to the circuit table - sort of like the list of 50 states table which is looked up for an address field.

    on the otherhand if each segment is unique to a circuit - and it is not a static list - then what you really want is a subform/table relationship. Don't use any look ups at all. make them 2 separate tables. put into the segment table your cross reference field back to the circuit table id (not a lookup - just a field to hold the circuit ID). Then join these into Main form/ subform using a form.

  3. #3
    Padawan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2011
    Posts
    5
    Quote Originally Posted by NTC View Post
    on the otherhand if each segment is unique to a circuit - and it is not a static list - then what you really want is a subform/table relationship.
    Each segment is unique to a circuit. I am not sure about it being a static list or not. All data will be entered manually, and segments will not be deleted unless the circuit it is part of is deleted.

    Quote Originally Posted by NTC View Post
    put into the segment table your cross reference field back to the circuit table id (not a lookup - just a field to hold the circuit ID). Then join these into Main form/ subform using a form.
    I think I understand what you mean, I will have to look into form/sub-forms more.

    Thank you

  4. #4
    Padawan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2011
    Posts
    5
    Quote Originally Posted by NTC View Post
    this presumes that the segments table is a static list that has a sole purpose of providing info to the circuit table
    Actually, I will need to link the segment.name in other tables, plus I need to link the segment table to Visio ShapeData, so each line connector on a diagram can be linked to a circuit segment to identify the port IDs the circuit connects to.

    Does that change anything?

  5. #5
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    it does seem clear that segments are essentially the 'details' of a unique circuit. and so you will have a circuit ID field in your segment table. and that is a fixed relationship.

    in the segment table there can easily be a field for the Visio ID or link. or on the otherhand potentially the Visio data can have a field/link to the segment ID (I don't know visio). either way is fine - logically - it is really a matter of the user experience in terms of how/when data is being entered.

    hope this helps.

  6. #6
    Padawan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2011
    Posts
    5

    Create a query that shows available selections

    Thanks NTC, that helped me a lot.

    Ok so now I have a basic db with a form and sub-form I can use to enter a circuit and its corresponding segments at the same time.

    What I need to do now is for the "Segment A-end" and "Segment Z-end" fields to be some sort of lookup. I want the user to have to select an end-point. I need only the "available" end-points to appear. If an end-point has already been selected as a "Segment -end" than it should must not be selected again.

    How can I do this? I have attached the db I am working with. So for example I need to use the Circuits form to add a new record, and have the Segment fields actually pull from the "Fiber Cassette" table somehow. Each cassette only has so many ports for fiber circuits. So I guess I would need to add these ports into a column of "Ports"? But then how to only be able to select ones not already assigned to a segment somewhere?

  7. #7
    Padawan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2011
    Posts
    5
    ****bump****

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

Similar Threads

  1. Table Setup advice for invoice processing...
    By Delta729 in forum Database Design
    Replies: 1
    Last Post: 11-23-2010, 11:52 AM
  2. design advice
    By Sarge, USMC in forum Database Design
    Replies: 4
    Last Post: 10-06-2010, 07:53 AM
  3. advice on planning tables
    By justinm1015 in forum Access
    Replies: 1
    Last Post: 09-16-2009, 02:27 AM
  4. Recommendation On Creation of this Table
    By rochy81 in forum Database Design
    Replies: 21
    Last Post: 05-18-2009, 11:31 AM
  5. Need advice on what I have so far
    By rumplestiltskin in forum Database Design
    Replies: 2
    Last Post: 05-25-2006, 12:48 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