Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

toggle button value 1

Status
Not open for further replies.

davyre

Programmer
Oct 3, 2012
197
AU
hi,
i'm creating a form that has two toggle button, to select between two different textbox that user can insert into.
These two toggle buttons function as switch between two textbox, i.e when user select Togglebutton 1 then textbox1.visible=true and textbox2.visible=false vice versa.
Now the problem is how can I add a button to submit/continue that understands which togglebutton that user choose?
Code:
If Me.Toggle5 = True Then
    MsgBox ("yes")
End If

If Me.Toggle6 = True Then
    MsgBox ("no")
End If
the code above shows error runtime 2427 : You entered an expression that has no value
any help? Thanks!
 

Perhaps, something like...
Code:
If Textbox1.visible Then
    [i]do something[/i]
Else
    [i]do something else[/i]
End If


Randy
 
@dhookom:yes it is in a group as I made it using Option Group. But I cannot see the group name on the property sheet selection
@randy: Thanks! It worked! I was trying to use the same idea but not sure what to say in the IF clause. Thanks!
 
thanks for your additional info, dhookom. Great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top