Good afternoon, I have a db in which access to specific tabs is based on security levels. The db opens with a Navigation form [frmNavMain]. I am using a LogIn form in which I have built VBA code to allow access to specific tabs based on their security level. Works great! My problem now is that within [frmNavMain], I have a subNavigation form [frmMain]. There are tabs on subform [frmMain] that I would like to disable based on the employee's security level. I have attempted multiple times and am having the same problem in that VBA cannot find the tab "navMagAll". I am getting runtime error 2465 with "can't find the field 'navMagAll" referred to in your expression. Below is a short version of my code. The code fore the tabs on the [frmNavMain] are coded correctly and working perfectly. The last line is for the subform [frmMain]. Any help would be appreciated.
Case 3 'Manager
Forms![frmNavMain]!navHome.Enabled = True
Forms![frmNavMain]!navUserInfo.Enabled = True
Forms![frmNavMain]!navEmployees.Enabled = True
Forms![frmNavMain]!navCert.Enabled = True
Forms![frmNavMain]!navTA.Enabled = True
Forms![frmNavMain]!navMag.Enabled = True
Forms![frmNavMain]!navAdmin.Enabled = False
Forms![frmNavMain]!navExtra.Enabled = True
Forms![frmNavMain]!NavClose.Enabled = True
Forms![frmNavMain]![frmMain].[Form]!navMagAll.Enabled = False