Subform not getting focus

BeeJayEff

Registered User.
Local time
Today, 01:12
Joined
Sep 10, 2013
Messages
198
I have a form with a subform which is sized to show several records at the same time. If Record A has the focus, and I click anywhere in Record B, then Record B gets the focus, as expected. ... Except if I click on an Image field in Record B, when the focus stays on Record A.
Any ideas how I can force it to set the focus to the other record ? I don't think this can be done with Events handlers, as they need to have the focus set first.
 
Just at a guess, is the Image set to Enabled=False? Nevermind, apparently Images don't have that property...

Does the Image have a Click event associated with it (in other words, why are you clicking on it, or is it just blank real estate that you would like to be an easy place for users to switch focus with)?
 
Does the Image have a Click event associated with it (in other words, why are you clicking on it, or is it just blank real estate that you would like to be an easy place for users to switch focus with)?
No, it doesn't have a click event, but it does have a double-click, which invokes a FollowHyperlink, causing the image to be displayed in IE. So what actually happens is that the double-click causes the wrong image to be displayed. There is plenty of blank real estate for the user to click on, but they will inevitably just go straight to the picture !
 
Heh, gotta love users...

What happens if you add a dummy Click event? Me.SetFocus or something might be enough...
 
I can give that a try when I'm back on the system tomorrow, but I don't think it will work. I know that the record selector at the left side of the subform stays on the previous record when you click (or double-click) on an image on a different record - and my understanding is that that record selector shows which record has the focus. If you click on any other (non-image) control on the other record then the focus moves immediately. If it makes any difference, this is Access 2013.
 
If it doesn't work, post a stripped version of your database (.accdb is fine, though I'm in 2010 not 2013) and we'll see if somebody can figure it out. That's really odd.
 

Users who are viewing this thread

Back
Top Bottom