473,385 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Option Buttons

If Option1.Checked = True Then
Text1.Text = "Management"
ElseIf Option2.Checked = True Then
Text1.Text = "IT"
ElseIf Option3.Checked = True Then
Text1.Text = "Clerical"
ElseIf Option4.Checked = True Then
Text1.Text = "Canteen"
End If
If Option5.Checked = True Then
Text1.Text = Text1.Text + "(Male)"
Else
Text1.Text = Text1.Text + "(Female)"
End If
End Sub
Can someone come to our assistance please. Have entered aforementioned code which relates to 5 option buttons into the click data entry portion of command button. However msg box comes up warning of syntax error every time the command button is pressed. The command line code is in yellow & the word checked is in blue. I've checked the microsoft help site but the code seems to be OK. We're totally lost............
Jan 29 '07 #1
1 783
iburyak
1,017 Expert 512MB
Try this:

[PHP]
If Option1.Value = True Then
Text1.Text = "Management"
ElseIf Option2.Value = True Then
Text1.Text = "IT"
ElseIf Option3.Value = True Then
Text1.Text = "Clerical"
ElseIf Option4.Value = True Then
Text1.Text = "Canteen"
End If
If Option5.Value = True Then
Text1.Text = Text1.Text + "(Male)"
Else
Text1.Text = Text1.Text + "(Female)"
End If[/PHP]
Jan 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at...
5
by: Georges Heinesch | last post by:
Hi. I created an option group using the wizard. I included 3 option buttons. An option group (in general) can be enabled or disabled completely (includung option buttons and their respective...
11
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
5
by: tsnyder | last post by:
I need to have an option button that allows editing to a field only when it is checked.
1
by: Stephen D Cook | last post by:
What I am trying to do is have a set of option buttons which are required to click one. If the person doesn't click any before insert, they get an error. If they do click one, it inserts into the...
1
by: Stephen D Cook | last post by:
In my form I have an option group with 3 option buttons. My form is tied to a table. the options are Temp, Permanent and Overtime. I have these inside a frame. I have an AddRecord button to enter...
0
by: sparks | last post by:
I was using the keypress with an option group If Me.ActiveControl.ControlType = acOptionGroup Then If KeyAscii >= 48 And KeyAscii <= 51 Then Me.ActiveControl.Value = Chr(KeyAscii) End If End...
1
by: ahmed222too | last post by:
how to use the option buttons in VBA (how to call the value of the option buttons ) and is it must to gather the option buttons in one option group ? thanks
1
beacon
by: beacon | last post by:
Hi everybody, I've searched around for answers, but the closest thing I've found referenced the Northwind database and it seems to be set up a little differently than mine. I'm using DAPs (data...
2
beacon
by: beacon | last post by:
Hi everybody, I have a form that has a combo box that asks the user to select the program they work on. Once the user selects the program, a SQL statement populates the row source for 4 staff...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.