Choose () Function

m17347047711116

Registered User.
Local time
Today, 23:03
Joined
Feb 4, 2002
Messages
68
Trying to use the choose function can't remember exactly how

Have an option group for departments on my screen

would like to use the Choose() function in a list box

in the control source for the list box i am typing:

choose()"Department1";"Department2";"Department3"

But it is not working, any help
 
Choose is similar to a select case statement except that your are choosing an option from 1 to ...

Example:

Code:
Public Function MyChoose(bytOption as Byte) As String
Dim stMyChoose as String

'bytOption must be a number between 1 and 3 or an Error _
 Will Occur
stMyChoose=Choose(bytOption,"First Name","Middle Name","Last Name")

MyChoose=stMyChoose

End Function
 
Don't overlook the Switch function as a way to choose what to display for a given value.
 

Users who are viewing this thread

Back
Top Bottom