|
-
Apr 26th, 2013, 09:10 AM
#1
Thread Starter
New Member
button event problem within TabPage
Hello,
First I'll note that I'm using VBA 6.5 for MS Access 2007.
(slight simplification for the sake of the question)
On my main Access form ('HRQOL') I have a TabControl containing two TabPages. The first TabPage ('Main') contains basic text input fields, and the second ('Followup') contains a list which I would like to be able to expand/shrink via a button on that second TabPage. Technically there are two buttons (Minimize, Maximize) with alternating visibility. I have tried catching/handling the 'On Mouse Up' event with a VB event procedure:
Private Sub Maximize_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
( for selected list elements set visibility to True)
Private Sub Minimize_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
( for selected list elements set visibility to False)
A button click though, produces the following error:
The expression On Mouse Up you entered as the event property setting produced the following error: A problem occurred while Microsoft Office Access was communicating with the OLE server or ActiveX Control.
As part of this whole process the button was initially inside a subform 'Followup1' that is on the TabPage 'Followup'. With that arrangement the button was able to fire an event properly, but once it was moved out of the subform (the more appropriate design) all hell broke lose.
I also tried having the TabPage itself catch the event (rather than the button) based on position of the mouse click but this also fails spectacularly because now every mouse click on the TabPage leads to the error, not just the clicks over the button.
Is there an inherent problem with buttons on a tabpage?
My guess is not, I just haven't been able to find an good answer anywhere.
Thanks for reading.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|