Option Group doesn't work

S

Stuart Grant

I have set up a smal form to choose one of two options and assign a value
to a public variable for use in the project.

I used the Option Group Wizard to set up the frame with two option buttons.
The Wizard seemed to work fine. Also added an OK button to assign the value
and close the form.

Problem 1 - When I click on the second option, the border round the name of
the choice moves but the option button itself does not change It still
shows the first (default) choice selected.
Problem 2 - The OK button assigns the value to a variable and then does a
DoCmd.Close. This produces an error message saying that Access had a
problem communicating with the ActiveX control. The error occurs even if
all I do is DoCmd.Close with the event written by the Button Wizard.
Problem 3 - The Project Explorer now shows two other project groups ACWZMAIN
and ACWZTOOL which expand into a long string of projects, but if I click on
any of them, I get an error message "Project can not be viewed"

Obviously I don't know much about Option Groups or indeed about Access but
would be grateful if someone could straighten me out.

Stuart
 
A

Arvin Meyer [MVP]

1. It could very well be that that control is corrupted. I'd delete the
Option Group, compact the database and re-create it.

2. You normally don't assign a variable, then close the form. To do so would
force the variable out of scope.

3. This is normal behavior for the wizard code. You cannot view Microsoft's
wizard code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
S

Stuart Grant

Thank you for jumping in.

1 - I have deleted the Option Group, compacted (and repaired ?) the database
and recreated it. Same result.

2 - The variable is declared in a module as Public. Since I want to use it
in other queries and forms, doesn't it make sense to save it ? And I get
the error even if I just try to close the form, although I can close it with
the Close button.

3 - Noted. But why does Access clutter up the Project Explorer with these
things which you can't access anyway ?

Stuart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top