Results 1 to 4 of 4

Thread: How do i assign relationships primary key access

  1. #1
    Join Date
    Apr 2009
    Posts
    105

    How do i assign relationships primary key access

    I would like to know that how do i assign relationships primary key access on my system. if suppose i have two tables where i assign one Table A termed as "EmployeeID" whose type is AutoNumber, whereas in table B would be termed as EmployeeID assign as a foreign key. Now, i would like to assign Table B,the type of EmployeeID should show AutoNumber or Number by creating the relationship between the two tables using their EmployeeID. By the way i know that AutoNumber is not exactly same as number as compare to EmployeeID in this case. Can any body tell em that how can i do so? Does any body knows about it? Kindly provide me the solution for the above issue.

  2. #2
    Join Date
    Apr 2008
    Posts
    4,088

    Re: How do i assign relationships primary key access

    Primary keys are unique record identifiers that MS Access uses when retrieving information for a query or a report. With primary keys, you can join tables in relationships so that you can query both of them at once. Just follow the below steps mention.

    1) Just open a table in Design view.

    2) Then click on the Row Selector for each field you want to set for the primary key. The Row Selector is the small box that allows you to select an entire row.

    3) Then try to click on the Primary Key icon in the toolbar, or select Primary Key from the Edit menu.

    4) If you've selected a field for a Primary Key that already contains data or returns a null value, MS Access will not allow you to create a primary key.

    5) You can also edit the data so it's no longer duplicated.

  3. #3
    Join Date
    Jan 2008
    Posts
    3,755

    Re: How do i assign relationships primary key access

    First try to import the table as such without assigning the Primary key. Then open the table in its design view and click the field and then press the button of Primary key from toolbar. On saving the table if access does not allow you to save with primary the most probable cause will be that your field has got duplicate values so check them before going further.

  4. #4
    Join Date
    May 2008
    Posts
    3,316

    Re: How do i assign relationships primary key access

    In order to make a foreign key link back to its primary, you must explicitly declare a relationship between the main and secondary tables that links the two fields. Then if you want things to be automatic done, you must use a QUERY that exploits the relationship by having both tables contribute to the query.

Similar Threads

  1. Change Primary Email Domain and Remote Access URL SBS 2008
    By EshiKaa in forum Small Business Server
    Replies: 6
    Last Post: 27-12-2011, 02:01 AM
  2. How to make relationships with various entities in MS Access
    By Ferdinand Alosa in forum Windows Software
    Replies: 3
    Last Post: 06-02-2011, 04:14 PM
  3. Access does not allow Primary key with two fields
    By Reckon in forum Networking & Security
    Replies: 2
    Last Post: 16-06-2009, 03:48 PM
  4. Replies: 2
    Last Post: 03-06-2008, 03:16 PM
  5. Replies: 3
    Last Post: 31-01-2006, 07:19 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,010,629.39950 seconds with 16 queries