Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:07:46+00:00 2026-05-15T23:07:46+00:00

I have a little multiple choice application. There are 4 green check marks and

  • 0

I have a little multiple choice application. There are 4 green check marks and 4 red x’s that will come up based on the right answer or the wrong answer.

They are all not-visible initially and are in specific places on the form so that when they become visible, it’ll be like a green check mark if they get it right next to their answer and a red check mark next to their answer if they get it wrong.

I decided to make a sub-procedure that accepts three arguments, their answer (“A”, “B”, “C” or “D”), the green image reference to make visible and the red image reference to make visible.

Unfortunately, I can’t make them pass the references at all. The intellisense knows what objects I’m referring to.

Private Sub btnA_Clicked ()
  Question_Answered("A", imgGreenA, imgRedA) 'images referenced from form'
End Sub

Private Sub Question_Answered (strUserAnswer as String, imgGreen as Image, imgRed as Image)
  ...
End Sub

Another (probably related) problem is that I can’t assign the images from the form to local variables in that Question_Answered sub, like this:

Dim imgGreen as Image
imgGreen = imgGreenA

Using MS-Access 2003 MDB with MS-Access 2007.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:07:47+00:00Added an answer on May 15, 2026 at 11:07 pm

    Calling a VBA-function with a control object does work without problems. Did you write your function in the same form or in some module?

    To assign a control variable, you have to use set, so it is Set imgGreen = imgGreenA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a little test application at the minute and I have multiple
I need to write an application that will check for something every X time
I have a script that creates files on multiple threads. Occassionally, I will get
i have a screen with multiple little widgets (all with different divs around them).
mmm, I have just a little confusion about multiple auto declarations in the upcoming
I have only a little question: Why the CFPreferences-API creates multiple files in my
I have little bit longer question for you - but hope answer will be
I need to have a command handler for a ToggleButton that can take multiple
Background I have a TreeView that follows the MVVM design pattern and supports multiple
I have a little problem with a selectbox that have to have some marked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.