Results 1 to 8 of 8
  1. #1
    windmi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    5

    Relationships required for creating forms

    I am very new to ACCESS and willing to try and create a time tracking program for my small company.



    I have three tables tblProjects, tblEmployees, tblWorkHours. I would like to create a Form to input all data for tblWorkHours and also have employees add some info already enterd in tblProjects and tblEmployee such as Employee name, Project No, Location.

    Ultimately be able to print weekly time reports per project or a report showing hours at different locations.

    Attached is a relationship diagram i have set already. something is wrong there because when I use them together I can not see data in a query of beable to fill a form.

    Any help is appreciated....
    Attached Thumbnails Attached Thumbnails Capture.PNG  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Show the query statement or provide db for analysis. Follow instructions at bottom of my post.

    Why do you have EmployeeID in tblProjects?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    windmi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    5
    I have the EmployeeID in tblProjects so I can keep trak of Supervisor on the Project.

    I attached a copy of the DB with Data removed. If you need some data tell me.

    This Project started long ago with a template from microsoft office access 2007 Inside Out. Work schedule has kept from this project but know it is need even more to stream line reporting and tracking. I have many areas to address but right now I want to do a time sheet tracking whats noted in tblWorkHours for each employee than get reports worked out later.

    One step at a Time

    Thank you.

  4. #4
    windmi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    5
    I hope this has the attached DB
    Attached Files Attached Files

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The PK EmployeeID field in tblEmployees and the PK ProjectID field in tblProjects are number type fields, should they be autonumber?

    Why is the PK ProjectID field set up as a combobox with a lookup to Surveyors table?

    Lookups in tables incorrectly reference table names.

    The lookup for EmployeeID in tblWorkHrs assigns the wrong field as BoundColumn

    Review http://access.mvps.org/access/lookupfields.htm

    Change qryWorkHoursDetails to:
    SELECT tblWorkHours.*, [FirstName] & " " & ([MiddleName]+".") & " " & [LastName] & (","+" "+[Suffix]) AS Employee, tblProjects.Vessel, tblProjects.LocationID
    FROM tblProjects RIGHT JOIN (tblEmployees RIGHT JOIN tblWorkHours ON tblEmployees.EmployeeID = tblWorkHours.EmployeeID) ON tblProjects.ProjectID = tblWorkHours.ProjectID;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    windmi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    5
    1. ProjectID & EmployeeID are assigned based on present company policies and assigned manually
    2. Dont know - just realized - changed it to a text box is that OK
    3. What should it look up?
    4. Changed column count to 2 EmploeeID comes up not last name.
    5. Will review lookupfields
    5. "change gryWorkHourDetails to:" Where?? Sorry.

    Maybe I should start from scratch and learn as I go or can this realy be solved and workable with out an expert like you...? What say you...

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    1. Okay
    2. Okay
    3. tables are named with 'tbl' prefix, the Lookups don't have the 'tbl' prefix
    4. you want to hide the EmployeeID column by setting ColumnWidths: 0";2"
    5. good
    6. this is suggestion for structure of the query, paste the sql into the SQL view of query designer or edit the query with the Design View

    Everyone learns differently. I was lucky to already have an understanding of database principles and programming concepts when I started with Access and I also had a face-to-face mentor to rely on.

    If you haven't gone through an introductory book with tutorials, might be a good idea, or take a $400 class at university.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    windmi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    5
    Thanks I will consider this complete. Have a great day

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

Similar Threads

  1. Creating Required Fields on a form
    By topp in forum Access
    Replies: 4
    Last Post: 06-27-2012, 03:20 PM
  2. Replies: 3
    Last Post: 04-27-2012, 08:34 AM
  3. Forms help required
    By martin james in forum Access
    Replies: 5
    Last Post: 12-16-2011, 10:18 AM
  4. Replies: 3
    Last Post: 11-09-2011, 02:29 PM
  5. Creating Relationships and Queries
    By nacho in forum Database Design
    Replies: 4
    Last Post: 04-16-2010, 03:22 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