My form eventually does what I would like it to do, but I get a Runtime 2455 error and have to go through the motions of closing the debug window to get my search results.
I have used the Wizard to add a command button to Find Record, and I have also tried with macros. When I enter the criteria, a Runtime 2455 error message appears. When I click on the debug button, it shows the line of script (in **) which was written to determine the status of an employee (have they worked within the last 90 days?):
As soon as I close this window, my results appear, but every time I repeat the search, I get the same error.
I will definitely concede that my coding is rather rudimentary, but I just stumbled into VBA by accident.
Thanks,
Stephanie
I have used the Wizard to add a command button to Find Record, and I have also tried with macros. When I enter the criteria, a Runtime 2455 error message appears. When I click on the debug button, it shows the line of script (in **) which was written to determine the status of an employee (have they worked within the last 90 days?):
Code:
Private Sub Form_Current()
* If Forms!frmEmployeeAll!sbfrmDays.Form!MinOfDays <= 90 Then *
Me!status2.ForeColor = 8388608
Me!status2 = "Active"
Me!Name.ForeColor = 8388608
' Otherwise, Status2 reads Inactive and the Member
' is flagged with Red text in the Name field.
Else
Me!status2.ForeColor = 150
Me!status2 = "Inactive"
Me!Name.ForeColor = 150
End If
End Sub
As soon as I close this window, my results appear, but every time I repeat the search, I get the same error.
I will definitely concede that my coding is rather rudimentary, but I just stumbled into VBA by accident.
Thanks,
Stephanie