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
NoActiveDesktop under LOCAL_MACHINE gets reset to value of 1 after reboot. If NoActiveDesktop key under LOCAL_MACHINE is deleted, it is recreated and assigned a value of 1.
Installing Blackberry Enterprise server on Exchange server itself
Count rows of table between two dates for value in text box
WebBrowser and Knowing when page is loaded
How to show treeview inside combobox
Function to check results
Save Excel file as Pipe delimited text file
VB.Net ERROR Message
WCF Client Proxy Wrapper Configuration Abstraction
Two different certificates in one domain