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
website link takes me to the wrong website
What is the best for multiple iif statements access 2003
Password security for linked tables in Access
stsadm.exe not found with WSS 3.0 installation
Outlook 2007 client trying to download wrong default OAB
Microsoft SQL Server certification
Add grid object
MS Office 2003 - Please Insert Disc
How do I restore system from Windows 7 backup?
SQL awkward behaviour (urgent)