Closing user form in Initialize macro?
Check for a valid connection (abiolity to retrieve) prior to initailizing the
form. If you are not going to be able to run the retrieve then dont run the
initialize...
HTH
"Don Wiss" wrote:
I have a situation where the user form Initialize routine can fail to
retrieve data from Access (which is used to populate a combo box). I now
display a msgbox, but I then have to display the form, which of course is
non-functional. I tried using Unload Me, but it didn't work. Presumably
as the form wasn't yet loaded. I would think there must be a way to abort
an initialization and not display the form.
Don <www.donwiss.com (e-mail link at home page bottom).
|