I have a code running that greys out and disable the specified pages of a record when a selection is made from a combo box
This how the codes look like
I have converted to ACCDE format and after the conversion error message pops up.
Pic 1 shows the error
Pic 2 shows the combo box where the status is updated
Pic 3 shows the effect after update
I would be so grateful for your expert advice and direction.
Thanks
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 48[/imgnothumb]
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 49[/imgnothumb]
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 50[/imgnothumb]
This how the codes look like
Code:
Private Sub employmentstatus_AfterUpdate() If Me.[employmentstatus] = "RETIRED" Then Me.[PersonalDetails].Enabled = False Me.[EmployDetails].Enabled = False Me.[PayRoll].Enabled = False Me.[FamilyDetails].Enabled = False Else Me.[PersonalDetails].Enabled = True Me.[EmployDetails].Enabled = True Me.[PayRoll].Enabled = True Me.[FamilyDetails].Enabled = True End If If Me.[employmentstatus] = "VACATED POST" Then Me.[PersonalDetails].Enabled = False Me.[EmployDetails].Enabled = False Me.[PayRoll].Enabled = False Me.[FamilyDetails].Enabled = False Else Me.[PersonalDetails].Enabled = True Me.[EmployDetails].Enabled = True Me.[PayRoll].Enabled = True Me.[FamilyDetails].Enabled = True End If End Sub
Pic 1 shows the error
Pic 2 shows the combo box where the status is updated
Pic 3 shows the effect after update
I would be so grateful for your expert advice and direction.
Thanks
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 48[/imgnothumb]
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 49[/imgnothumb]
[imgnothumb]http://bytes.com/attachment.php? attachmentid=75 50[/imgnothumb]
Comment