Results 1 to 2 of 2
  1. #1
    delta is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    19

    Access Table and Sub Table

    I have 2 tables.

    I would like to create a daily tracking system for HR as follows :
    Once I find required Staff Name I can find all works done daily for corresponding
    staff. This is for filing purpose. For example : Name : xyz.


    xyz has done many things in HR activities :
    - Passport Renewed
    - Visa Applied
    - Salary Increment
    - Vacation applied etc etc...
    for each activity there will be a Serial Number in Table2
    I am confused about connecting primary key and foreign key.
    I need SN_ of Table1 : 1, 2, 3, 4, 5 series in manual.
    I need SN_ OF Table2 : Auto number in 1, 2, 3, 4, 5 series.
    and for staff number 1
    activity number e.g.: 10, then for staff number 2 I want to get 11,
    after that any of other staff I want activity number 11 (in auto number itself).
    What is long integer in Field Id? what is the use of long integer?
    Shall I give diferent field id for both SN_ in Table1 and Table2?


    Table1
    SN_ primery Key
    STAFF_NAME
    MOB_NO

    Table2
    SN_ foreign key
    Activity

  2. #2
    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,870
    I suggest you do some research on database design and planning.
    Here is a brief outline for steps in setting up a database from databaseanswers.org.

    Code:
    Back to the Data Model. Event Types :-
    1. Annual Leave
    2. Assignments
    3. Join
    4. Sick Leave
    5. Training

    Set-up Procedures :-
    1. Organisation Structures
    2. Staff Assignments
    3. Staff Movements
    4. Tracking Staff Training

    This is our General Approach to Database Design. It is based on a structured method to establish the FACTS :- 1) Define the Area of Interest,(e.g. the HR Deparment). 2) Define the "Things of Interest",(e.g. Employees), in the Area of Interest. 3) Analyze the Things of Interest and identify the corresponding Tables. 4) Establish the relationships between the Tables. 5) Determine the characteristics of each Table,(e.g. an Employee has a Date-of-Birth). 6) Obtain a small set of Sample Data, eg. "John Doe is a Maintenance Engineer and was born on 1st. August, 1965 and lives at 22 Woodland Street, New Haven. "He is currently assigned to maintenance of the Air-Conditioning and becomes available in 4 weeks time" 7) Confirm the first draft of the Database design against the Sample Data. Obtain from the users some representative enquiries for the Database, e.g. "How many Maintenance Engineers do we have on staff coming available in the next 4 weeks ?" Review the Results of Steps 1) to 7) with appropriate people, such as Users, Managers, Development staff, etc. and repeat until the final Database design is reached.
    Here is a link I often suggest to posters re database planning and design.


    I would also suggest you watch a few of the free "knowledgeknuggets" youtube videos by BA-Experts. These are short, humorous and full of concepts.
    https://www.youtube.com/watch?v=HWIM...mjhO96N4Bio5Yc

    https://www.youtube.com/watch?v=dPB0lUrpeYA&t=219s
    Good luck.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-31-2017, 12:19 PM
  2. Export Data from Access 2003 Table to SQL Server 2012 Table.
    By Robeen in forum Import/Export Data
    Replies: 3
    Last Post: 02-26-2016, 02:07 PM
  3. Replies: 4
    Last Post: 01-21-2015, 09:34 AM
  4. Replies: 2
    Last Post: 12-22-2010, 01:46 PM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 AM

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