Results 1 to 6 of 6
  1. #1
    brezja is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    5

    Displaying Certain Records in a Form Based on a Table Value

    I've been searching high and low over the internet for a solution to this. I'm by no means an advanced user of Access and have figured out things through trial and error. I have a database that will serve as a member directory for our various Safety Teams. I have the main table done that will hold all of the member data as well as an input form to add things to that table. They are the All Campus With Safety Teams table, query, and form.

    What I'm looking to do is to make additional forms for each of our safety teams (CEAT Team Roster, ERT Ream Roster, WARN Team Roster, and CERT Team Roster) so that if the check box is checked on the main input form...and the value for a particular field is "yes" on the main table.....only those records that have the "yes" values would populate on the individual team form would come up so we could view records individually by team.

    IE....Someone who is a member of the CEAT team would have the combo box for "CEAT" checked giving them a "Yes" value for that column. All members that have that yes value would then populate on the CEAT Team Roster Form so we could view them individually.



    I know that I could just do a query and a report, but I was looking to possibly link pictures so that we could see their faces as well with the profiles. I know it's a Macro or VBA code that I would need to put in to make this happen...

    The columns on the main table that I would be working with are titled "ERT", "CEAT", "CERT", "WARN" They are all Yes/No and show up as check boxes on the main form, but text boxes on the table. I would upload a copy of the database...but it's already 11 MB and it won't upload.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Did you run Compact & Repair then zip the db? Make copy and remove most of the data.

    Can member be only one roster type? If yes then instead of 4 yes/no fields should be one field with 4 possible values.

    Regardless, only one form should be required, just apply filter as needed.
    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
    brezja is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    5
    Actually...I created a new one with just the essentials of what I'm currently working on (no switchboard, images, or anything)....so this should help. Sorry, new to most of this and I'm open to any suggestions.

    I can't just have one roster type, as many of our employees serve on multiple teams. This need to be able to reflect all of the cross overs for these teams.
    Attached Files Attached Files

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I think you're going to have to Normalize your tables. One table can not satisfy your set up.
    I see these at the outset.

    Employee
    Team
    TeamType
    TeamMember (junction) [could be called TeamRoster]

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I suggest one form, [All Campus Safety Personnel] and filter the RecordSource. Options:

    1. build in dynamic filtering on the form itself so users can choose filter criteria after the form opens

    2. open the form from another form with filter criteria applied


    BTW, recommend no spaces or special characters/punctuation (underscore is exception) in naming convention. Better would be EmpID or Emp_ID.
    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
    brezja is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    5
    Thanks for the advice, but I found another work around. I made a query on the main table with the criteria that the value for one of the teams must = True. Then I re bound the form to that query and now every time I open it, it only displays the results for that team. I love that feeling of overcoming something that's been in your way for a few days. Thanks guys for the kind help, I'll definitely keep your suggestions in mind for future reference, I'm sure they'll come in handy sooner than later!

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

Similar Threads

  1. Replies: 10
    Last Post: 10-14-2013, 10:18 AM
  2. Replies: 10
    Last Post: 07-23-2013, 05:07 PM
  3. Replies: 2
    Last Post: 08-15-2012, 02:21 AM
  4. Sub form based on table select specific records
    By ReluctantGeek in forum Forms
    Replies: 0
    Last Post: 01-21-2012, 11:24 AM
  5. Replies: 4
    Last Post: 03-20-2011, 08:45 PM

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