Hello,
I have created a database and I want to deal with any problems that may occur once it's up and running.
I want to add Error handling code to my database that creates a new record in the 'Error' table, each time there is an error, and stores information about the type of eror that occured and when it occured.
Sub Example()
On Error GoTo ErrorCode
Statements...
Statements...
End
ErrorCode:
MsgBox ("Error"
Open recordset...
AddNew record...
End Sub
First of all, is there a way to get visual basic to take a screen print when the Error occurs and then paste that image into a cell in the 'Error' table?
(If not I can just write unique text to the 'Error' table to identify which code was running at the time, but a screen print would be more helpful.)
Second, I believe the code above, on an error, would go to the error code then just end. Is there a way to rearrange the code so that the error code would run, then continue running the rest of the original code?
Third, the forms in my database are not directly linked to a table, they set themselves to the users tables in their Form Load procedure. I get messages poping up when the form loads because the RecordSource is not valid until it's set, and each coded query asks for confirmation before completing.
I can go to the 'Tools' menu, then 'Options' and then click the 'Edit/Find' tab and change the 'Confirm' settings, but I think that only works on my computer. I don't want these messages poping up on User's computers. Is there a way to get Access to change the Confirm settings for each user.
(Or a more helpful, better way)
Lastly, does anyone know of a better way to record, and manage, system errors?
Please let me know
Thank you,
Blair ;-)
I have created a database and I want to deal with any problems that may occur once it's up and running.
I want to add Error handling code to my database that creates a new record in the 'Error' table, each time there is an error, and stores information about the type of eror that occured and when it occured.
Sub Example()
On Error GoTo ErrorCode
Statements...
Statements...
End
ErrorCode:
MsgBox ("Error"
Open recordset...
AddNew record...
End Sub
First of all, is there a way to get visual basic to take a screen print when the Error occurs and then paste that image into a cell in the 'Error' table?
(If not I can just write unique text to the 'Error' table to identify which code was running at the time, but a screen print would be more helpful.)
Second, I believe the code above, on an error, would go to the error code then just end. Is there a way to rearrange the code so that the error code would run, then continue running the rest of the original code?
Third, the forms in my database are not directly linked to a table, they set themselves to the users tables in their Form Load procedure. I get messages poping up when the form loads because the RecordSource is not valid until it's set, and each coded query asks for confirmation before completing.
I can go to the 'Tools' menu, then 'Options' and then click the 'Edit/Find' tab and change the 'Confirm' settings, but I think that only works on my computer. I don't want these messages poping up on User's computers. Is there a way to get Access to change the Confirm settings for each user.
(Or a more helpful, better way)
Lastly, does anyone know of a better way to record, and manage, system errors?
Please let me know
Thank you,
Blair ;-)