Hello Everyone, thanks in advance for the help!
I have an Access database that uses forms as a 'front-end' data entry apparatus; more precisely subforms to collect these data within the form. There are several departments within our company and each department has their own form to enter data. To complicate things, I have subforms within each form. Each subform collects data for a different table.
For example, I have a 'Purchasing' department form, and they use the 'Budget' subform to enter their budget information. They also have a 'Employee' subform within their form, and a 'Materials' subform.
What I would like to do is create a VBA code that will automatically filter the subforms based on the form that is opened. For example when Purchasing opens their form, Budget, Employee, and Materials subforms will automatically be filtered by 'Department'.
Here is the code I am currently struggling with. I have it placed on the Property Sheet/Event Tab/On Open category:
So for each subform, I want to implant this code in the hopes that I can automatically filter every subform within the respective forms for each department. Same subform, but different forms. I'm hoping the VBA code can be used to automatically filter each subform based on the filter that is opened by the department.HTML Code:
Hope I have explained my issue with sufficient detail
Much Thanks,
-Polar
Bookmarks