Hi All,
Within a form I have the following 3 pieces of code:
Private Sub Date_Analyzed_AfterUpdate()
Call Date_SmaI_Uploaded_to_CDC_AfterUpdate
End Sub
Private Sub Date_Recd_in_Molc_Lab_AfterUpdate()
Call Date_SmaI_Uploaded_to_CDC_AfterUpdate
End Sub
Private Sub Date_SmaI_Uploaded_to_CDC_AfterUpdate()
Me.SmaI_TAT_Recd_to_Uploaded = (WorkingDays([Date_Recd_in_Molc_Lab], [Date_SmaI_Uploaded_to_CDC]))
Me.SmaI_TAT_Analyzed_to_Uploaded = (WorkingDays([Date_Analyzed], [Date_SmaI_Uploaded_to_CDC]))
End Sub
This was intended to calculate SmaI_TAT_Recd_to_Uploaded and SmaI_TAT_Analyzed_to_Uploaded (essentially a date difference but excluding weekends), but as soon as I enter a value into the field Date_Recd_in_Molc_Lab (the first field used in the calculation that I enter data into) I get this run time error. I am not sure why this is since I have a very similar set of code within the same form:
Private Sub Date_Collected_AfterUpdate()
Me.Age = (Int(([Date_Collected] - [Date_of_Birth]) / 365.25))
End Sub
Private Sub Date_of_Birth_AfterUpdate()
Call Date_Collected_AfterUpdate
End Sub
This code runs just fine. It does not give me this error when I enter a value into the first record (Date_of_Birth) the way the other code does. Any help would be appreciated. Thanks.