Microsoft
Software
Hardware
Network
Question : MS Access VBA - test if docmd.openquery successful
If I run the following code....
docmd.setwarnings false
docmd.openquery "qryUpdate"
docmd.setwarnings true
how can I test if it has been successful or not. For example, because I have warnings switched off, if I do an update query that puts text into a number field it fails but doesn't tell me. How can I get around this (without switching warnings back on which isn't an option)
Many thanks
Answer : MS Access VBA - test if docmd.openquery successful
You can switch to a different method, which will error out if trouble arises:
Sub SomeButton_Click()
On Error Goto ProcErr
Currentdb.Execute "The SQL FROM qryUpdate"
Exit Sub
ProcErr:
Msgbox Err.Number & ": " & Err.Desciption
End Sub
Random Solutions
Union All Query for Sub Report Order By
How to get application path in VB.NET ?
I need to capture the output of the datagrid grdAttendees and record each Members Email Address.
How do you Clone a Custom List Item
where parameters aspx .net page
Error received - "Access to the path 'C:\System Volume Information' is denied." - when trying to search for a file
How to rename a RDP session printer
data transfer cable vista
Can't get the Excel ado connection to work with .xls version 2.1
Access 2003: transfer spreadsheet is failing