Sue, I can definitely see where you're coming from with this. That's why I
originally wrote my question like this:
I have a custom form with a combo-box control. The Combo-box is populated
with data from an Access database using DAO. It works fine, but there's one
minor issue with remote users. If they aren't connected to the company
network, they obviously can't populate the combo-box and the form errors out,
which is fine, but r_e_a_l_l_y s_l_o_w_l_y, which is not fine.
The problem is that the error is generated by this line of code:
Set DatBase = DBEngine.OpenDatabase(strDBPath & strDBName)
I'm sure if I knew how to test whether strDBPath was a valid path before
calling the OpenDatabase object, it would be seconds quicker, but I don't
know how to do it. This must be easy, but I don't really know where to start
with it.
Can anyone advise?
Thanks in advance
Vaughan
But that didn't excite anyone enough to get a response. Having posted about
20 or so questions to this group over six months, I have found that when I
give a full explanation of what I'm trying to do nobody answers. If I then
boil the question down to a couple of lines, I usually get exactly what I
need (more often than not from you Sue. And believe me, I couldn't be more
grateful for all your help.)
In this case, the ploy only worked up to a point. Wolfram has answered my
specific question (thanks Wolfie) but, as you spotted, that doesn't resolve
my overall problem of how to test whether the path to my database is valid
when I run the form. If you (or anyone) can give me a solution to that, I
would be most extremely grateful.
Thanks again for your interest and help
Vaughan