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
how to skip tempdb in SP_MSFOREACHTABLE and SP_SPACEUSED
How do I reduce the memory iexplore.exe is using, as it can get as high as 260,000k
How do you create ODBC in VBA to retrieve a text file from remote server then populate access table?
How do I determine if a server is or was a DC
DNS records for TLS in OCS 2007 R2
sql permissions to use adp
C# -- DataGridView "AuotSizing" HEIGHT ?
Access Checking for duplicates , Help with "You can't save this record at this time"
changing AD login names
Windows 7 - Repairs wrong drive