Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Option Values!!! (getting mad) 1

Status
Not open for further replies.

Legenocide

Programmer
Aug 24, 2004
7
0
0
US
This happens a lot and I don't know why, sometimes when I play my project the option buttons are already selected including all it's effects! The code is set on False Value so I know that can't be the problem, I know the code is correct. It also happens to my friend. Any help?
 
can you post up your code? is your code on the forms load? is there any other code on the page that would cause it to change values after the form loads?
 
Private Sub cmdtwo_Click()
opttwoone.Visible = True
opttwoone.Value = False
opttwotwo.Value = False
opttwothree.Value = False
opttwofour.Value = False
lblquestiontwo.Visible = True
lblquestionone.Visible = False
opttwotwo.Visible = True
opttwothree.Visible = True
opttwofour.Visible = True
cmdtwo.Visible = False
txtresult.Text = ""
imgonethree.Visible = False
End Sub

when i click on that command button opttwothree is always selected, but i don't know why. there is no other codes that would have any affect on it :/
 
ok so you are saying that opttwothree when your form comes up is defaulted to true? because the click of cmdtwo is setting the opttwothree.value = false, so it *shouldnt* be selected.

have you looked at the properties of opttwothree to make sure the value property isnt set to true?

 
yea it is on false, i put the opttwothree.Value=false just to double make sure it wouldn't but selected but it is always defaulted when i access my project for some reason.
 
there has to be something on the forms activate or load thats causing to to be checked.

have you tried to do another new project and put an option check on it and run it?

i know this may sound silly, but whens the last time you did a full restart of your puter?

do you also have the latest services packs for vb?

 
hmm, i searched the code again and if there is something that's causing it i can't find it.

i went to another project and it worked fine, not to mention that the thing i am making is a trivia so question 1 works fine but when i go to question 2 the option button gets checked automatically...

i fully restarted my PC today...

i'll go d/l those service packs right now
 
actually its opttwotwo that's getting auto selected. i did a Ctrl + F and searched the entire code window and nothing has anything that would make the option button act the way it does.

BTW i downloaded service pack 5 but it didn't seem to fix it.
 
that is a strange one... tough call to make on it...

if you want to post up your project somewhere and let me take a look at it?

or you can email me directly: cbennett08@yahoo.com

that way we can take a look at the project and see whats going on...

 
i sent you my project, if you see any problems can you tell me about it
 
Now we have the perfect example of why email should NOT be used in the forum.

We have an interesting question, a simple answer, 2 people who know the answer and 65,888 people who can't find the answer. Please respect the forum guidelines (faq222-2244) and post the answer and explanation so others may benefit from your wisdom

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Hmm...

It would be helpful if posters could attach files to their posts, but I suspect that management's view is perhaps that the hosting would be prohibitively expensive...

mmilan.
 
Can you post the solution so we can all benefit?
Thanks,

Sam
 
user was making a trivia vb app and each time after the first question was answered, when he made the option buttons visible it would fire off the click event for that option and cause the answer to be already displayed for the second answer before anyone could make their selections. he was using one form to handle all kinds of questions with the same options boxes etc..

had him break the questions up into seperate forms, which resolved the issue and also helped him learn how to use multiple forms (he is just learning vb).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top