Access VBA to Filter Records by Textbox contents

  • Hello, World!


    I always think it helps to start with the narrative and design goals, if you don't need this, please jump to the part you're interested in. My manager has tasked me with sending out emails to 165 managers, who collectively have 816 employees. These 816 employees have not completed their annual training(s). I'm asking the managers to respond by email with an update of their team members' progress, which can be (1) Incomplete the default, (2) Complete, (3) Exempt, (4) On Leave, (5) Separated.


    I think it would be much easier for everyone to self-manage this process than me dealing with more than 165 emails and trying to keep track of everything, and am making my first real attempt at an MS Access database. I think its cleanest if, upon opening their forms, the managers only see it come up blank. For sake of managing access controls/signatures, I only want them to see their team members, not all 816 records.


    I've created two tables inside my database. Those are WorkingTbl and Dispositions. The former contains all the relevant data for each incomplete training. The latter contains the 5 types of dispositions. The relationship is defined from Disposition to the Condition field of WorkingTbl. A Query, WorkingTbl Query, and Form, Annual Compliance Training, sit on top of these foundational tables.


    I'm trying to have some VBA to (1) get the form to open as blank and (2) get the "run" button the filter WorkingTbl by its "Passcode" column. So if a manager only has 6 employees and they all have her passcode stored in their "Passcode" field, then those 6 records should be available to that manager. They can then go in, change the disposition for each employee, and save and exit.


    And I guess the next part after this is being able to send the managers a version of the form only, such that they can make their updates and "send" the updates to my "Source" file which will then update the "Condition" column of WorkingTbl with the new disposition.



Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!