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.

Access checkboxes

Discussion in 'Business Applications' started by defscarlett, Aug 5, 2008.

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

    defscarlett Thread Starter

    Joined:
    Feb 17, 2007
    Messages:
    146
    I have 2 tables one with employee information, and one with contract information. Only certain employees are trained at certain contracts. What I would like is when I pull up contract information there is a list of employees who are trained at that contract, and when I pull up the employee information there is a list of the contracts that they are trained at. I want these to be checkboxes and to only display the contracts they are trained at, not all contracts.

    What's the best way to go about this?
     
  2. OBP

    OBP It's My Birthday!

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You need what is commonly known as a Many to Many Table, which is in fact a Table with a One to Many Relationship on either side.
    The Table would have a Field for the EmployeeID and a Field for the ContractID, in this way you can "link as many contracts to one employee, but also as many employees to a contract as you like.
    To bring the 2 back together you would use a Query and Form based on the new table.
    To see this kind of thing being built see this Thread.
    http://forums.techguy.org/business-applications/715768-access-help-see-attached-db.html
     
  3. defscarlett

    defscarlett Thread Starter

    Joined:
    Feb 17, 2007
    Messages:
    146
    It won't allow me to create a 1:Many relationship between Employee ID and MM Employee ID, only a 1:1... ?

    Client
    Name
    Address
    Phone
    Supervisor
    Pay Rate
    Client ID

    Joint
    clientemployee ID
    MM Client ID
    MM Employee ID

    employee
    Employee ID
    First Name
    Last Name
    Primary PHone
    Secondary Phone
     
  4. OBP

    OBP It's My Birthday!

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Make sure that the ID fields in the Joint are not Autonumber fields, just Number type Long Integer and not key fields.
     
  5. defscarlett

    defscarlett Thread Starter

    Joined:
    Feb 17, 2007
    Messages:
    146
    All the ID fields are all Long Integers... what the heck could cause this?

    *edited to add file attatchment*

    Another question... would I be able to delete the client ID field as the primary key and change the Primary Key to Client name?
     

    Attached Files:

  6. defscarlett

    defscarlett Thread Starter

    Joined:
    Feb 17, 2007
    Messages:
    146
    anyone?
     
  7. OBP

    OBP It's My Birthday!

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Your problem is the EmployeeId field in the Jucintion table, it was set to Indexed with "No Duplicates".
    Have a look at this version.
     

    Attached Files:

  8. defscarlett

    defscarlett Thread Starter

    Joined:
    Feb 17, 2007
    Messages:
    146
    Thanks, OBP.

    Would it be possible to delete the CLient ID field and make the Primary Key the Client Name or would that mess it up?
     
  9. OBP

    OBP It's My Birthday!

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You could, but it is not recommended, it just uses more Disk Space and memory and is not necessary.
     
  10. 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/737174

  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