Solved

option boxes EASY

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 64
Copy a row 12 58
VBA: Select SQL query based on a config Sheet v2 11 38
Spell Check in VB6 13 99
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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now