Passing Form Objects to VBA Subs/Functions in MS-Access -


I have a little multi-option application that has 4 green check marks and 4 red x which is the correct answer or wrong answer Will come on the basis.

They are not all visible at the beginning and are in specific places on the form so that when they become visible they will be like a green check mark, if they are right next to their answer. And a red

I decided to perform a sub-process which accepts three arguments, their answer ("A", "B", "C" or "D"), a green image To make reference visible and red image reference to see.

Unfortunately, I can not explain these references at all. Intellisense knows what I'm referring to. The personal sub-BTNA_link ("A", IMG Greeneye, IMGRADA) 'Referring Images from Forms' End Sub-Private Sub Questions- Answered (String as the answer string, image of IMG Greens in the form, IMGR as the image ...) Another (probably related) problem is that I can not specify images in local variables such as question-answer sub, this way From:

  dim imgGreen as image imgGreen = imgGreena  

Access MS Access 2007 using MS Access 2003 MDB.

Works without calling a VBA-function with a control object. Have you written your function in a single form or in some modules?

To specify a control variable, you must use the set , so set it to imgGreen = imgGreenA .


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -