G
Guest
Hi,
I have a string variable (StrErrorDescription). This variable is sourced via
referencing the ERR.Description. When an error occurs because a form cannot
be seen. The error says "The form 'xxxx' cannot be seen"
(note the additonal ' symbols in the error description, as this causes my
error)
I am trying to write this to my table in a SQL statement as per below:
DoCmd.RunSQL "INSERT INTO TBL_SYS_ERROR_LOG ( Error_Date, USER_ID,
APPLICATION_NAME, PROCEDURE_NAME, VB_ERROR_NUMBER, VB_ERROR_DESCRIPTION )
SELECT Now(), '" & fOSUserName & "', '" & Logname & "','" &
StrCurrentProcedureName & "', '" & StrErrorNo & "', '" & StrErrorDescription
& "';"
This doesn't handle the additional ' symbols in the error description. Any
suggestions for a solution would be appreciated.
Thanks
I have a string variable (StrErrorDescription). This variable is sourced via
referencing the ERR.Description. When an error occurs because a form cannot
be seen. The error says "The form 'xxxx' cannot be seen"
(note the additonal ' symbols in the error description, as this causes my
error)
I am trying to write this to my table in a SQL statement as per below:
DoCmd.RunSQL "INSERT INTO TBL_SYS_ERROR_LOG ( Error_Date, USER_ID,
APPLICATION_NAME, PROCEDURE_NAME, VB_ERROR_NUMBER, VB_ERROR_DESCRIPTION )
SELECT Now(), '" & fOSUserName & "', '" & Logname & "','" &
StrCurrentProcedureName & "', '" & StrErrorNo & "', '" & StrErrorDescription
& "';"
This doesn't handle the additional ' symbols in the error description. Any
suggestions for a solution would be appreciated.
Thanks