Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Reference single instance of control in continuous forms view in MS Access 2003?

I'm using continuous forms view in MS Access for pretty much the first time. I'm trying to set things up so that when you mouse over a specific image control, it changes. Unfortunately, I have no idea how to reference just the active control, so I end up with the changes in all of the controls. How do I programmatically reference just the one control?

Update:

quantumkev - perhaps I need to elaborate. Referencing a control in continuous forms view references ALL of the controls of that name. So if I try to set the focus to ctlMyImage, I get an error 2110, can't move the focus to control ctlMyImage, because there are multiple instances on the form called ctlMyImage. The question is, is there a way to reference just the one instance that I want and, if so, how?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Probably one of more specific yet in-depth questions I've seen on Yahoo answers in a while. Congrats topher.

    Usually I HIDE fields "SelField1" "SelField2" etc in the form header and set each one's Datasource to =Field1, =Field2 etc respectivly. They automatically change values as You select different records.

    I havn't tried to reference/change specific CONTROLS per record yet (IE change background color based on value), though that WOULD be pretty cool, and I'm sure there is a way.

    You may get a better/faster response on an Access forum or by digging through the Microsoft Knowledge Base. I don't know if the NORTHWIND sample DB did THAT, so it may not help, but it's also available from the Microsoft Knowledge Base.

    A lot of typing just to say "I DON'T KNOW", but I hope one of the links helps...

  • Anonymous
    1 decade ago

    You need to reference the control by name and set the focus on it. For example :

    ctlYourImage.SetFocus

    Then, you should be able to reference just that control, i.e.

    ctlYourImage. (whatever you want to manipulate)

    Good luck.

Still have questions? Get your answers by asking now.