Solved

Option boxes, sending info to text box.

Posted on 1998-11-18
3
168 Views
Last Modified: 2010-05-03
Ok, I have a array Option set...And what I need is to make a scorer. When I click one option box, it makes Text in a seperate Textbox, add 1 point to a score (That starts at  Zero). How could I do that?
0
Comment
Question by:Klueny2
3 Comments
 
LVL 1

Expert Comment

by:mithomas
ID: 1445544
Do all option buttons increment the score by one, or do they increment by different values?  Give us some more detail, and you'll get a good answer.

:-)
0
 

Author Comment

by:Klueny2
ID: 1445545
Ok...I'll try to make it clearer this time. I have 1 Option Array...with 5 option clicks, and 5 text boxes that go with it. I will Have 3 Command buttons one that adds 1 point to score, one that adds 2 points, and one that adds 3. Now, what I want to do is when I hit a certain option click...then hit the command button of 1,2, or 3 points...that points will be added to the matching text box with the options...If thats  unclear, please ask some more details.
0
 
LVL 2

Accepted Solution

by:
schild earned 50 total points
ID: 1445546
that was very clear

and here is your program:


Private Sub Command1_Click(Index As Integer)

    Dim OptIndex As Integer
    For OptIndex = 0 To 4
        If Option1(OptIndex).Value = True Then
           Text1(OptIndex).Text = CStr(CInt(Text1(OptIndex).Text) + Index + 1)
           Exit For
        End If
    Next
   
End Sub

Private Sub Form_Load()

    Dim Index As Integer
   
    For Index = 0 To 4
        Text1(Index).Text = "0"
    Next
   
End Sub

Please be ware that the Command buttons are array as well, the first button add 1 point the second two and the therd add three point

Good Luck
Schild
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

840 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