Results 1 to 3 of 3
  1. #1
    rlbroerman
    Guest

    male female (access 2003)

    I have an option group with male and female buttons. When I save a record it puts a 1 or a 2 in the table and then when I print a report it prints a 1 or 2 instead of "male" or "female". How can I get "male" or "female" on my report instead of 1 or 2?
    Thanks

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: male female (access 2003)

    When you create an option group it asks you what values you want the options to have. The values are always numers, and the default values start at 1.

    If you want to actually store "male" and "female" in your table, then you would need to make the option group unbound, and use the after update event to write the actual value to the table. It would be easier to leave the numbers in the table, then create a new table for Gender, that translates these numbers into words, then join that table to the query behind the report, and pull words from that table.

    If you need more help on how to do that post back
    Regards
    John



  3. #3
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: male female (access 2003)

    You could create a textbox with the controlsource:
    =IIf([Gender]=1,"Male","Female")
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •