Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unanswered: Relational Relationship

    I am hoping thsi is a basic issue. i know I can do it easily in other data bases. I want to ccreate a relational relationship. That is that I want information to flow through. I have the Steates in the State teble, the City table links to the State table. In this way I want the choice of a city in the Main table to fill in the State automatically. Currently in a form view I get #Name? in the State field and in the table view I get a drop down menu that lists the numeric numbers for the states in the order they appear in the City table. I believe the #Name? error is because the field wants text and is receiving a value. The number issues is because the State referane in the City table is in essence a value (a number), not the actual text. Any ideas on how to fix this?

    Table: Main
    KeyMain
    Customer
    City
    State

    Table:City
    CityKey
    City
    State

    Tabletate
    KeyState
    State

  2. #2
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    The #name? is because you are asking the text box to pull data from a control that does not exist. ( check for typo's)
    The number issue is that you either have the wrong field bound or do not have the columns set properly. in your example the city key is first so that is the column displayed. Make the Column count 2, making the coulmn widths 0";1" will hide the number and just show the name.
    Darasen

  3. #3
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    first of all, you don't need state field in your Main Table if you are going to normalize this database. a city can be blong to only one state and you can represnt it with a state foreign key in the city table. I will attach the screen grab of the releationship for you.
    Attached Thumbnails Attached Thumbnails Relation.gif  
    ghozy.

  4. #4
    Join Date
    Aug 2003
    Posts
    4
    Alright, the #name? was due to some field switching... forget about it. However I do want a State filed in the Main table. Thie is because I want to be able to layout the address in a form for mailing putposes. This is driving me nuts... Maybe I am not explaining myself properly.

    In the Main table I want to choose the City and have the State be completed automatically. This State funtion comes from a buried relationship. The City table includes City (names) and thier chosen State. This choice comes from the options in the State table.

  5. #5
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    could you please add field types of all fields?
    ghozy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •