Access - Floating Mouse over a Label

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Chris_E

Thread Starter
Joined
Feb 16, 2006
Messages
360
Hello

Its a busy day and seems to be full of little annoying gremlins. Here's another.

In a form, I have a simple rectangle box to delineate a number of controls. I'm using a simple "Label" to describe the content of the box "Customer Information" for example.

When loaded, I move my mouse over the label and the form "flickers". I note the label could be linked ot a Hyperlink, its not, but I find the flicker annoying.

Ideas anyone?

Chris
 
Joined
Aug 5, 2005
Messages
3,086
The flickering is probably a repaint. What version of Access are you using? Labels don't have very many events. Does the form's Details (Detail? I don't remember) have a MouseMove event or something? Mouse events on a form's Details component only apply to space not covered by another control, so when you mouse into a label, Details would fire a MouseOut event (or whatever that event's called in VBA).

chris.
 

Chris_E

Thread Starter
Joined
Feb 16, 2006
Messages
360
Cheers again Chris

I'm on Access 2003.

Both the label and form detail (singular) have "MouseMove" event possibilities. Wish they didn't as I'm pretty sure that this is where the repaint is coming from.

Is there a way to tell access NOT To do this, such as Me.Repaint = "NO DON'T DO IT!!"

:D

Chris
 
Joined
Aug 5, 2005
Messages
3,086
Nothing should be happening if you haven't explicitly specified some kind of repaint code. In other words, if neither of those controls currently have a MouseMove event handler, my original guess probably isn't your problem. That is, it sounds like a repaint issue, but it isn't coming from MouseMoves on the label and Details controls.

Does it happen every single time you mouse over the label? Does it happen when you move the mouse within the label? Drag the pointer very slowly within the label; does the form constantly flicker?

chris.
 

Chris_E

Thread Starter
Joined
Feb 16, 2006
Messages
360
Howdi

Well, the flicker happens as I move INTO and OUT of the field. Moving within it doesn't cause any flickering.

Hmmmm

C
 
Joined
Jun 11, 2003
Messages
152
Sounds like cristobal is on the right track. I can simulate this behaviour in my version of Access, by adding code (Me.Refresh) to the MouseMove Event. Adding it to the event on the label causes the flickering to occur whenever the mouse is moved within the boundaries of the label box; adding it to the Form MouseMove Event causes it occur whenever the mouse is moved across any area of the form. Me.Repaint didn't have the same effect in my very quick test. I suggest you search through the VBA form module for any occurrence of the Refresh or Repaint methods and check what event is invoking the method. If it looks superflous (i.e. is not invoking the method for any significant reason) try commenting it out and then test your form thoroughly to check that it performs every action it's designed to perform. If it functions correctly it's probably safe to leave the code commented out; delete it if you prefer but check with the author of the code first (if that's not you of course) in case it's there for a good reason.

Deej
 
Joined
Aug 8, 2007
Messages
1
I didn't stop to look at the date on this, but just in case it's newer than, say, 3 years old -

In all of my experience this is caused by unassociated labels. Access automatically looks for something to link the label to, and thus give focus, when you hover your mouse over a label. If you don't have the label associated with anything, you get that annoying repaint of all of your controls. Also, if you have 2 or more labels associated with one control, you'll get the same obnoxious flicker.

Go through and associate all of your labels with controls of some sort (command buttons, picture boxes, anything) and it'll clear up the error. If you have to, cut the label and then paste it back in so that the association error pops up when you mouse over the lable in design view. I'm sure there's a way to do the association otherwise (probably in code view) but I haven't found it yet.
 

Chris_E

Thread Starter
Joined
Feb 16, 2006
Messages
360
Hi recursion

I think you have it and I'll look at it tomorrow.

Will report back with my findings!

Cheers

Chris
 

Chris_E

Thread Starter
Joined
Feb 16, 2006
Messages
360
Hi Recursion

You were exactly right! The label(s) that cause the repaint were not associated with a control. Associating them with a control stops the flicker. I have one remaining issue...

I have designed my form with care, each control has an associated label. For layout purposes I have placed a box shape around some of the text fields to 'group' them into a logical user entry set (like "Customer Details", "Project Information" and so on). Its only for prettiness but I think the GUI is helped by it.

Boxes don't have labels though and so to give the 'box area' a descriptive title, I use a label. When you create the label an association error shows (good) but there are no available control to associate it with (all controls already have a good label) and the "Box" is not avaiable for association, even when I choose "Show All Controls in the Current Section".

So, a floating label will always be so and the flicker will prevail. Boo Hoo :-(

Of course, I could use a proper text box control, not a lable, but thats a workaround?

I wonder what I can do now?

Chris
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top