Solved

option button

Posted on 2001-08-15
14
169 Views
Last Modified: 2010-05-02
Hi,

When i choose (click) an option button and after that  make it invisible , when i return it visible back i find it still black (as chosed ) but it is on lost focus
how can i make it clear after finish using it ?

Thanks
0
Comment
Question by:Shoushou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
  • +2
14 Comments
 
LVL 8

Accepted Solution

by:
DennisBorg earned 15 total points
ID: 6389175
Set the value of that option button to zero (0)


   Option1.Value = 0



-Dennis Borg
0
 
LVL 3

Expert Comment

by:czpczp
ID: 6389179
Private Sub Command1_Click()
    Command1.Visible = False
End Sub
0
 
LVL 3

Expert Comment

by:czpczp
ID: 6389183
Ooops, I thought you said command button
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:vim_asteya
ID: 6391281
Same as that of DennisBorg
option1.value=false
0
 

Author Comment

by:Shoushou
ID: 6391952
Hi Sirs,

I tried the answer : option1.Value = 0 (false)
but i still have the same problem .

Thanks
Shoushou
0
 
LVL 1

Expert Comment

by:vim_asteya
ID: 6392001
Private Sub Form_Click()
Option1.Visible = True
Option1.Value = False
End Sub

Private Sub Option1_Click()
Option1.Visible = False
End Sub

I checked using the above code.
If this isnt what u want,pls get back to me
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6392442
Shoushou:

>I tried the answer : option1.Value = 0 (false)
>but i still have the same problem .

That line of code will work as far as unselecting that option button.

One thing to remember, is that if that option button gets the focus, its value will be changed and it will then be selected (i.e. that black dot)

Is that option button getting the focus after you deselect it by setting the value property to 0?


-Dennis Borg
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6392443
Please show us the pertinent code, and we can probably help you better.
0
 

Author Comment

by:Shoushou
ID: 6421927
Dear Sirs,

Thanks for your help , i discovered my mistake , it is like tht :

i make those option buttons as array then i should type this code

option1(0).value = 0
option1(1).value = 0

not to make the code as follow

option1.value = 0

Bye
Shoushou
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6429242
I had no idea you were using a control array.

The following comment of yours:

>I tried the answer : option1.Value = 0 (false)
>but i still have the same problem .

You should have told us that you got an error, instead of it not working.

The knowledge that you got an error, and what it's message was (in this case "Compile Error: Method or Data Member not found") would have been very helpful in troubleshooting your problem.

Glad you got it working now.

How do you intend on closing this question?


-Dennis Borg
0
 
LVL 3

Expert Comment

by:modder
ID: 6437285
the asamir00 and Shoushou accounts were duplicates and have been closed.

Please advise as to how points should be awarded

modder
Community Support Admin
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6437411
Modder:

In this case, I would suggest that my first reply answered the question.

It was later brought out that a control array was being used, which did not change the answer, but rather changed how to implement that answer.

I feel that my answer(s) deserve the credit for this question.

-Dennis Borg
0
 
LVL 3

Expert Comment

by:modder
ID: 6437421
OK
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6437446
Thank you modder!   I appreciate all your hard work on keeping these message boards cleaned up.  :-)


-Dennis Borg
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question