Results 1 to 2 of 2
  1. #1
    peachesflora is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    1

    Help with setting up database

    Relatively new to access, just not sure if how I am setting up my database would allow me to do what I need it to. Unless it make sense to do otherwise, I set it up with two tables.

    Student Table
    First Name
    Last Name
    Email
    Cell Phone
    College
    Department

    School Table
    College
    Department
    School Street Address
    City


    State
    ZIP

    What I want is to create a contact like database. I want to use a form to input new student data. Is there a way for it to automatically fill-in the address if I input the college and department? How do I base my form on the two tables so it does this?

    Many thanks.

    -Access beginner

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I would add a third table for department, as one college can have many departments. Also, if you consider a double-major, each student could possibly have multiple departments. You would then need a 4th table to facilitate a many-to-many relationship between Student and Table. Here's how it would break down with the m2m relationship.

    tblStudent

    studentID (primary key)
    FirstName
    LastName
    Email
    CellPhone
    Department (foreign Key)

    tblCollege
    collegeID (primary Key)
    collegeName
    etc

    tblDepartment
    DeptID (primary key)
    DepartmentName
    etc
    collegeID(foreign key)

    tblStudentDept
    studentDeptID (primary key)
    studentID(foreign key)
    departmentID (foreign key)

    *Notes*
    1. notice that college and department are not in all of the tables anymore. This is due to the relationships you will be creating in the relationship window
    2. it is imperative that you create primary keys which are unique to each record. without these, using Access is pointless
    3. remove any spaces and special characters (!@#$%) from your table and field names. This makes querying much less tedious.
    4. read up on the following terms before continuing your database "relational database", "database relationships", "ms access forms"). That should give you all the info you need to get going and is all available for free on Google.

    That's pretty much it. Good luck with your db and post back with any more questions.

    Cheers!

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

Similar Threads

  1. Setting SQL = string
    By jasonbarnes in forum Programming
    Replies: 7
    Last Post: 02-18-2011, 11:02 AM
  2. Need help in setting up a DB construction
    By ClownKiller in forum Database Design
    Replies: 5
    Last Post: 01-06-2011, 06:21 PM
  3. Setting value of a formfield
    By toddbuckles in forum Programming
    Replies: 7
    Last Post: 12-27-2010, 09:46 PM
  4. Setting up a simple database on a network
    By crunch in forum Access
    Replies: 10
    Last Post: 07-12-2010, 01:24 PM
  5. Setting up new database
    By mduplantis in forum Database Design
    Replies: 1
    Last Post: 06-23-2010, 11:07 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