I am new to coding and have an issue that when the code below runs and finds the table empty it errors and falls over.
How could I amend the code to accept this condition and continue running the remaining code
Would it be best to test the presence of data in the table before calling the function or use error trapping?
Thanks you in advance for your advice
Des
How could I amend the code to accept this condition and continue running the remaining code
Would it be best to test the presence of data in the table before calling the function or use error trapping?
Thanks you in advance for your advice
Des
Code:
Function Clr_Results()
Set activedb = DBEngine.Workspaces(0).Databases(0)
Set RES = activedb.OpenRecordset("Results")
RES.MoveFirst
Do
RES.Delete
RES.MoveNext
Loop Until RES.EOF
RES.Close
End Function