Solved

option boxes EASY

Posted on 2002-05-14
2
128 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
change vba from autofit to 13.5 width? 4 29
Updates not working for MS Windows 7 12 181
Microsoft Access combo box help 2 49
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 54
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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

856 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