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

option bottoms

Status
Not open for further replies.

gasx

Technical User
Feb 28, 2003
22
US
I have two option bottoms for male and female on my form.
the value for male is 1 and for female is 2.
when I select male I get 1 when I select female I get 2. I like instead of 1 and 2 get "X" when I print my pre printed form.

please help
 
Write this function in Global Code (Or Report Code if you use only one time)

Code:
Public Function RetornaSexo(MaleOrFemale as byte)

 If MaleOrFemale=1 then
'Male
Code:
    RetornaSexo="x"
 Else
'Female
Code:
    RetornaSexo=Space(10) & "x"
'Try different values for Space
Code:
 End If

End Function

In your Report add a text box, in data section, Control Source Property put :

Code:
=RetornaSexo(Gender)

Assuming Gender is your Data Source for Gender (1 or 2)


if you want to Add a third sex use Select Case in RetornaSexo Function :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top