Option Groups

redblaze

Registered User.
Local time
Today, 08:38
Joined
Jan 12, 2002
Messages
54
im creating a search form, where the user can search for customers by their ID, first name and last name. i have a option group at the moment, consisting of 3 options..Customer ID, LastName and FirstName. if CustomerID is sleected i want the systsme to search for the ID only...simelar to if the Lastname were selected--search for lastname only.

the user enters the thing they are looking for in a text box..then clicks on a button. if option 1 is selected, only search for customer id, if option 2 is selected only search for customer lastname ect....

i seem to be running into trouble with the coding...eg..

if opt1 = true then
...................(coding)
end if
if opt2 = true then ECT ECT.

is the structure i have at the moment
but it doesnt seem to be working....can anybody help?! please!

i hope this hasn't been too confusing for anyone!!
 
Use the name of the option group (not the option button), eg-

Select Case OptGroupName
Case 1
.....code
Case 2
.....
End Select
 
Is the code that looks for the record(s) working? Are you using an SQL statement or are you trying to use a query?

If your Option Group is Named Opt then your code should look like this:

Select Case Opt
Case 1
...code
Case 2
...code
Case 3
...code
End Select

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom