Solved

option boxes EASY

Posted on 2002-05-14
2
130 Views
Last Modified: 2010-05-02
i have about 3 frames on one sstab screen, in each frame is about 4 option boxes.
for example
O =  Op1
0 =  Op2
0 =  Op3
0 =  Op4

as there is nothing similar except for the text, i will be doing this to put the result in the database:Private

Sub Option1_Click()
If Option1.Value = True Then
Text1.Text = "Op1"
End If
End Sub
----------the same method for each option---------

so on the update to the dbase i will use text1.text value, is this the best method??

B
0
Comment
Question by:bolox
2 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 7007901
Hi,

You can declare/ create the Option boxes as a Control Array, then you can check which Option button is checked by using this:

Private Sub Option1_Click(Index As Integer)
    Text1.Text = Option1(Index).Caption 'Or = "Opt" & Index + 1
End Sub

Do as similar for other frames

Hope this help
0
 
LVL 1

Author Comment

by:bolox
ID: 7008076
Thats it!!! an array, i forgot about that.

thanx
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 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