[AccessD] Tab Control PageIndex/Access Not Shutting Down

Andy Lacey andy at minstersystems.co.uk
Fri Jul 7 06:21:12 CDT 2006


Here's a thing. I've just discovered this and haven't heard it mentioned
before so thought I'd let you know. Am on A97 so don't know if applies to
later versions.

You all know I'm sure that there are issues with Access not closing down
properly under certain circumstances, like not closing all recordsets for
example. Well I've stumbled across another.

Take a form with a tab control. In the OnChange you put a select statement
to do stuff according to the tab selected. Hence, something like

Select Case me.tabctl
Case Me.tabMain.PageIndex
.....................
Case Me.tabSecond.PageIndex
.......................
Case etc
End Select

so far, so good. However I wanted the same thing to happen for two tabs so,
naturally (I thought) I coded:

Select Case me.tabctl
Case Me.tabMain.PageIndex, Me.tabOther.PageIndex
.....................
Case Me.tabSecond.PageIndex
.......................
Case etc
End Select


After much detective work I find that as soon as I click on tabOther Access
won't close down cleanly. Nothing to do with what code follows cos I've
commented out all of the code. And if I change it to:

Select Case me.tabctl
Case Me.tabMain.PageIndex
....................
Case Me.tabOther.PageIndex
same ..................... as above
Case Me.tabSecond.PageIndex
.......................
Case etc
End Select

the problem goes away. Curiously too, selecting tabMain does not cause it,
only selecting the second option in the Case statement.

Ain't that peculiar?


--
Andy Lacey
http://www.minstersystems.co.uk

________________________________________________
Message sent using UebiMiau 2.7.2




More information about the AccessD mailing list