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
Comparing text documents (originally HTML docs, but saved to text files)
sql
Help Displaying Message on Correct Child Form in MDI Parent
Show email id in excel
SBS2008 Standard - RDS - Virtual Desktops
Refresh data in a Bound datagridview VB.NET
VLookup (or another method like it)....
How to automatically compress backup files and move to a remote location
How do I align a SilverLight 2 DataGrid column right in XAML?
Open Sharepoint server's pdf file in asp.net...