catching cancel on QueryTable.Refresh
I am trying to write some code that will update a file DSN based ODBC query.
This prompts me for my username, password and datapath. However, if I click
cancelin the dialog box it just continues with the rest of the code. I want
it to alert me that Ithe operation has been cancelled and then end the code.
I have tried using err.number but it gives the same as if I confirm correct
details - no good.
Also by code it gives a second chance for entering the details before
causing an error - is there a way to catch this so it only checks once?
Many thanks
Tysop
|