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
Can a Lookup column be used in a calculated column
Changing exchanges external domain
how to uninstall dot net framework 3.5 service pack?
Oracle Case Insensitive Query
Run macro on protected sheet without asking for password
MS Access' ability to be used across a network
SQL + VB.net, update query. How to convert .. varchar to money ?
Import special toolbar from another database
Server 2003 Terminal Services and cable vs. T-1 internet service
Updating things based on info in a given record