[AccessD] attack of the Access pixies

John Clark John.Clark at niagaracounty.com
Fri Sep 30 13:49:33 CDT 2005


I have something really freaky going on and I need to enlist the help of
the Access gods of this list...to save my sanity if nothing else.

I was working on a form this afternoon, and adding bells and whistles.
Actually, I've created 16 custom buttons (2 for each state of 8
choices), and I am using them for the menu. I use these by placing an
image control under invisible control buttons. After placing in the
eight choices with their default pictures, it all worked fine. But as I
started adding the code for MouseMove, SetFocus, GotFocus, and
LostFocus, for the first button, I almost immediately noticed odd
behavior.  

When I moused over the first button, instead of alternating to the new
image, like I have programmed...and have done so many times before...it
gave me a message box that said it was "loading the image." I froze at
that time and the message stayed there. It turned out that as soon as
the mouse came off the button, it would change, but I've never seen a
load message before.

I figured that I would tend to this problem later and went on with the
other buttons. I added the second button and then tested it out...I
always take baby steps...I know they say, "God hates a coward," but he
doesn't always seem that fond of me either, so slow and careful is how I
try to operate. It still said that it was loading, but now I was wise
enough, for testing purposes, to move the mouse. Now, as soon as I hit
the second button, Access closes w/out any further warning. Of course I
hadn't saved my work in over 30 minutes...I'm always lecturing my users
about this, and I am usually good about it...so I had to retype a great
deal. I found out that it doesn't matter what order I do this in; it
always bombs on the second button that I mouse over. As another test, I
added code for a third button and it confirmed the same. No matter what
button you mouse over second is the trigger to close Access.

There is one more finding though. If I avoid the remaining two buttons
with code, after mousing over one first, and click on one of the five
"uncoded" buttons, everything goes back to normal, until I hit one of
the three "coded" buttons again.

This is the code that I use in the three buttons (this is one, but
besides the name, they are all the same):

*** Start Code
********************************************************************************************
Private Sub cmdEmpInfo_Click()

subformx.SourceObject = "frmSortedByLastname"

End Sub


Private Sub cmdEmpInfo_GotFocus()

imgEmployeeInfo.Picture = "C:\Documents and Settings\DefaultUser\My
Documents\Programming\graphix\Buttons\Custom\DSSPayroll_Orange\EmployeeInfo_2.gif"

End Sub


Private Sub cmdEmpInfo_LostFocus()

imgEmployeeInfo.Picture = "C:\Documents and Settings\DefaultUser\My
Documents\Programming\graphix\Buttons\Custom\DSSPayroll_Orange\EmployeeInfo_1.gif"

End Sub


Private Sub cmdEmpInfo_MouseMove(Button As Integer, Shift As Integer, X
As Single, Y As Single)

cmdEmpInfo.SetFocus

End Sub
*** End Code 
********************************************************************************************

BTW, This is A2K.

Is there some limit maybe on the path size? This won't be the final
path, which will most likely be something like, 
"//<server_name>/volume:data/access/dss/payroll/graphics/<filename>"

This is driving me batty! I am going to try a reboot right now, just to
see if there is some sort of memory issue on my PC...doubt it will work
though...I am grasping right now.

Thanks in advance!

John W Clark



More information about the AccessD mailing list