If in the Main Form (EmployeeEntry) the Employment Status is either Eligible or No Rehire or Disability then I want the following fields "grayed out" in the OSHA tab: EmployeeType, CraftCode, JobNumber and JobSite.
If in the the Main Form, the Employment Status is Active, then I want those fields "active"
Also, and I don't understand why it won't happen in this subform, but I want the Employee ID field to automatically populate in the subform for OSHA like it does in the Skills Inventory tab.
Well, the record sources are different. You're using tblEmpRating for "Skill Assessment", and then you're using
Code:
SELECT tblEmployeeInfo.*, tblJobs.JobSite FROM tblJobs INNER JOIN tblEmployeeInfo ON tblJobs.JobNum=tblEmployeeInfo.JobNumber;
for "OSHA". And tblEmployeeInfo is a completely blank table, so that's not going to work. I would determine the purpose of tblEmployeeInfo and then figure out the best way to proceed.
Thank you! Although I don't quite understand how you did that.
I think, now that you mention it, that my tables will have to be changed. The tricky part to this portion of the database is the only information that will always be filled out is the OSHATraining, with the exception when an employee does not have the training yet.
I may have to totally rethink my set up yet again.
THis is the 4th time in as many weeks that I have retooled the tables.
You're welcome. Take a look at the VBA code and see if you can decipher it. Try to deconstruct what each part is doing, and that will help you to better understand the overall picture.
One of the issues that you were running into was that you were utilizing both macros and VBA. I would recommend using only VBA, which will be much cleaner overall.
I suspect you are correct. Try to know what the purpose of each table is, and the relationships between the tables. That will help considerably.
Also, as a side note, I would redesign your form as well. Try to get everything to fit into 1 screen without horizontal or vertical scrolling. You will save yourself a lot of frustration in the long run.