Where does the record selector point? Is it to the first record of the
continuous form? If so, that's the active record. Where is the image control
located, is it in the detail section of the continuous form?
I tested this and I show that clicking on the image control doesn't move the
focus to the current record. As a work around, I placed a command button
over the image control, sizing it exactly the same as the image control, and
setting the command button's Transparent property to Yes. This make the
command button invisible to the user, but will allow things to work as you
want. Place the code in this command button's Click event.
--
Wayne Morgan
MS Access MVP
"John Smith" <so*****@microsoft.comwrote in message
news:pR*******************@fe09.news.easynews.com. ..
>I have a continuous form. there is a command button with the following code
for the OnClick event:
DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID
I click the button and frmPlants opens up with the record that corresponds
to the one on the cont. form.
I put that same code for the OnClick of an image control (i.e. the user
clicks a little icon to open the form instead of a button) and frmPlants
opens but to the first record on the continuous form.
What gives?