G
Guest
I submitted a post some time ago to look at solutions to report query errors
In the example below i have a query "qry_Append_LTD" which is an append query. Essentually I want the code below it to report an error if the reord cannot be appended. However, in practice the query appends but the error says it doesn't
Any ideas
'Append the PAF to the syste
DoCmd.OpenQuery "qry_Append_LTD", acNormal, acEdi
On Error GoTo ErrorLabe
DoCmd.SetWarnings Fals
DoCmd.OpenQuery "qry_Append_LTD", acNormal, acEdi
CurrentDb.Execute "qry_Append_LTD", dbFailOnErro
MsgBox "PAF has been saved successfully
ExitLabel
DoCmd.SetWarnings Tru
Exit Functio
ErrorLabel
MsgBox "The record could not be added.
Resume ExitLabel
In the example below i have a query "qry_Append_LTD" which is an append query. Essentually I want the code below it to report an error if the reord cannot be appended. However, in practice the query appends but the error says it doesn't
Any ideas
'Append the PAF to the syste
DoCmd.OpenQuery "qry_Append_LTD", acNormal, acEdi
On Error GoTo ErrorLabe
DoCmd.SetWarnings Fals
DoCmd.OpenQuery "qry_Append_LTD", acNormal, acEdi
CurrentDb.Execute "qry_Append_LTD", dbFailOnErro
MsgBox "PAF has been saved successfully
ExitLabel
DoCmd.SetWarnings Tru
Exit Functio
ErrorLabel
MsgBox "The record could not be added.
Resume ExitLabel