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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

toggle button

Status
Not open for further replies.

YanaD

Programmer
Mar 22, 2001
38
0
0
US
I have 2 toggle buttons on a vb6 form. One is 'AND' and the other one is 'OR'. I need to be able to click on 'AND' or on 'OR' and get a value from them in a code because i am doing a search of two strings in recordset(also i have 2 text boxes on a screen where i placing my search string in). So the user has to choose to place 'OR' or 'AND' between those two strings. Give me the sample code.
 
Use two option buttons (a.k.a radio buttons) and check their values. something like:
Code:
if optAnd.value = 1 then
  finalstring = string1 & " and " & string2
else
  finalstring = string1 & " or " & string2
end if


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top