1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

ms access

Discussion in 'Business Applications' started by nomad, Feb 16, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. nomad

    nomad Thread Starter

    Joined:
    Sep 30, 1999
    Messages:
    387
    I am building myself a database. I would like my relationsship on two paticular table to be one-to-one instead on one-to-many.can someone tell me how to do this. Also well I am playing with my database I found myself deleting records which in turn looses my auto number so the next field that I put in wont take the auto number from the record that I deleted and my number beomce un-sequential can anybody help me with these two problems.

    thanks
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    You can't do a one to one relationship the way you are thinking. You can however have is so one filed in one table can be a lookup value in another table. When you do this once an item is changed in the reference table the values will be reflected in the lookup value. This is useful when you want to have set values for data entry in a form also.
     
  3. nomad

    nomad Thread Starter

    Joined:
    Sep 30, 1999
    Messages:
    387
    Would you know about the second point I have mentioned regarding auto numbers
     
  4. sabotaj

    sabotaj

    Joined:
    Jan 19, 2003
    Messages:
    4
    You can get the 1:1 Relationship by fiddling around with the table prperties. Access creates a 'Many' relationship when you 'allow duplicate values' of the Foreign Key field in a table (ie the 'one' table. To achieve the 1:1...go to the 'one' Table, go to the field that is the Primary key in your 'many' table and change it to not allow duplicate values....that should do the trick- or have I confused you? coz i think i am :/ lol
     
  5. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Your autonumber field needs to be set as such in the field properties. It should make no difference if you delete a record from that table unless this is a problem with your concept of 1 to 1. Your number of course will become unsequential if you delete a record, it will not cascade or change the values that are already entered in the field.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/119154

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice