Re: Setting Focus on Continuous Form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Without seeing your setup/form, or having more explanation about what it is
so that I can fully understand the object to which you're referring, it's
hard to be sure. But my guess is that the bitmap object on which you're
clicking is not capable of receiving the focus, thus the focus is not moved.

Put a transparent command button on top of the bitmap image in the Detail
section, and use the Click event of that transparent command button to run
your code. That should fix the problem.

--

Ken Snell
<MS ACCESS MVP>

"scott" <sbailey@xxxxxxxxxxxxxxx> wrote in message
news:egZbOSnbHHA.3420@xxxxxxxxxxxxxxxxxxxxxxx
I don't understand why this is happening, but here's the problem. I tried
the same thing using an Access generated command button. It works fine.

The embedded image that I inserted has different properties than an Access
generated bitmap command button. For some reason, it's click event thinks
the subform's current record is the one that's selected. The access
generated command button will behave fine, that is that it receives the
focus and makes it's record the active record on the sub form.

Why would an "inserted" bitmap's onclick event behave differently than a
standard access generated bitmap?


"Ken Snell (MVP)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23wrrIYmbHHA.2408@xxxxxxxxxxxxxxxxxxxxxxx
Post the code that is running in the Click event of that "button".
--

Ken Snell
<MS ACCESS MVP>


"scott" <sbailey@xxxxxxxxxxxxxxx> wrote in message
news:%23zWkpUmbHHA.596@xxxxxxxxxxxxxxxxxxxxxxx
it's in the subform's Detail section


"Ken Snell (MVP)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx> wrote in message
news:O7Jr5OlbHHA.4544@xxxxxxxxxxxxxxxxxxxxxxx
Yep, and that should make that fourth record have the focus for the
code that runs from the click event. Is the image graphic in the
subform's Detail section, or is it in a different section of the
subform?
--

Ken Snell
<MS ACCESS MVP>



"scott" <sbailey@xxxxxxxxxxxxxxx> wrote in message
news:%23qoI2zkbHHA.4656@xxxxxxxxxxxxxxxxxxxxxxx
Picture this. Your looking at the form/subform and the 1st record of
the subform is active. There are say 10 records on the subform and
each record has a command button (I'm using a image graphic) to the
right of the record values.

Without realizing that the first record of the subform is active, it's
real easy to click say the subform's 4th record's image graphic that
opens the pop-up form.

Does that make sense?



< snipped >





.



Relevant Pages

  • Re: Problem locking bound controls
    ... <MS ACCESS MVP> ... command button on the form is cmdLock and it seems to be named correctly. ... The program works as it is supposed to until I place a subform in the ... "Ken Snell " wrote: ...
    (microsoft.public.access.formscoding)
  • Re: Problem locking bound controls
    ... <MS ACCESS MVP> ... "Ken Snell " wrote: ... The program works as it is supposed to until I place a subform in the ... you're using does not contain a command button named cmdLock. ...
    (microsoft.public.access.formscoding)
  • Re: Problem locking bound controls
    ... <MS ACCESS MVP> ... command button on the form is cmdLock and it seems to be named correctly. ... The program works as it is supposed to until I place a subform in the ... Lock the bound controls and prevent deletes on the form ...
    (microsoft.public.access.formscoding)
  • Re: Setting Focus on Continuous Form
    ... Put a transparent command button on top of the bitmap image in the Detail ... <MS ACCESS MVP> ... the subform is active. ...
    (microsoft.public.access.formscoding)
  • Re: Refresh causes unbound fields to be cleared
    ... at the start of my command button code. ... Try using the On Exit event of the subform to calculate the percentage like ... It is the Before Update event of the form. ... allocations between several possible work categories. ...
    (microsoft.public.access.forms)