Results 1 to 3 of 3
  1. #1
    Dirty_Head is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    17

    Can someone help explain relationships to me in regards to my project?

    I'm still working on my employee/item/project database. The whole idea behind the project is this: store information on employees (Personal info, emergency contact, job titles, pay rates, current certifications, equipment/items "issued" or "checked out" to). Then once the data is input via a basic form, be able to search/edit/add information.

    I'm struggling to understand how to relate my 4 tables and allow data entry on a single form or form/subforms(maybe tabbed form would be cool).

    Current iteration:
    Tables: (All Primary Keys are AutoNumber)
    ProfileTable
    [PK]ProfileID, EmployeeID, EmergencyID, JobTypeID, ProfileCreated[Default Value: Now()]


    JobTypeTable
    [PK]JobTypeID, JobType (List of trades)
    ExternalEmployees
    [PK]EmployeeID, FirstName, LastName, PhoneNumber1, PhoneNumber2, Address, City, State, ZipCode, SSN, Birthdate
    EmergencyContacts
    [PK]EmergencyID, EmployeeID, FirstNameE, LastNameE, AddressE, PhoneNumber1E, PhoneNumber2E

    Relationships:
    How do I relate this data? I'm completely lost every time I try to figure it out. I think I click and drag from ProfileTable each of the other field's primary keys. For example: from ExternalEmployees.EmployeeID to ExternalEmployees.EmployeeID.
    How do I add new records to all these tables at once AND include their IDs in my ProfileTable?

    Previous iteration: (Functional but not integrated with the rest of the database)
    I believe in this iteration I've created a "joining table" in the IssuedLog with items and employees. Trying to replicate but with profile instead.

    Tables: ExternalEmployees, IssuedLog, ExpendableEquipmentWithCost
    Relationships:
    [ExternalEmployees].EmployeeID -> One-to-Many -> [IssuedLog].EmployeeID
    [ExpendableEquipmentWithCost].ItemID -> One-to-Many -> [IssuedLog].ItemID
    Forms:
    AddExternalEmployee: Record Source is "External Employees" - Fields: First/Last name, 2 phone numbers, address and SSN and a "Add New Record" button.

    IssueEquipment: Record Source is "ExternalEmployees" with fields for personal information.
    Subform: "AddToIssueLogForm" - Fields: DateIssued, EquipmentType (combobox dropdwon). and "Add New Record" button.
    Sub"table": "IssuedLogSubTable" - Based on Query of IssuedLog selects which equipment and how much it cost.

  2. #2
    Dirty_Head is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    17
    I think I figured it out but I don't know what I did to make it work.

  3. #3
    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,850
    Dirty_Head,

    Relationships are based on the "business rules" of your business. They are NOT arbitrary lines between boxes.
    Your tables and based on the subject matter(entities) within your business that is of interest to your business.

    Here is a link to information on database planning and design.

    I recommend creating a clear description of the business involved. I also recommend the tutorials from RogersAccessLibrary identified in the linked info. You will learn about database design if you work through the tutorials. You will experience what relationships are and what you learn can be used with any database.

    You build a data model; create some relevant test data and some "business scenarios" --you can test your model with these test scenarios with pencil and paper. Make sure the model supports your requirements--adjust and retest as necessary. When your model satisfies your requirements, you now have a blueprint for your database.

    Too many people want to jump into physical Access too quickly without a plan or a clear understanding of the requirements. I can assure you that a trial and error approach to database will be a long, frustrating journey.

    Spend some time with the info in the link provided to understand the underlying concepts. An hour or two spent here is better than a month or two of "discovery and revamp". But you won't be the first to start with a physical database and identify new requirements as you step forward.

    Good luck.

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

Similar Threads

  1. Why is it so hard to explain VBA?
    By DigitalAdrenaline in forum Access
    Replies: 1
    Last Post: 08-20-2016, 06:04 AM
  2. Replies: 3
    Last Post: 01-22-2014, 11:31 PM
  3. Replies: 13
    Last Post: 11-03-2013, 10:25 PM
  4. Project Involving Table Relationships
    By annemrosenberg in forum Access
    Replies: 30
    Last Post: 07-25-2011, 07:22 PM
  5. Could someone please explain to me what a Switchboard is
    By wabbalee in forum Database Design
    Replies: 2
    Last Post: 06-26-2009, 07:20 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