Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Option Group Control (Access 2000)

    I am setting the parameter which controls my report via an option group control.This control is called HQ. If i do not choose an option
    from the HQ, i want the report to be opened with a record source called StrScience. This condition must be performed only if no
    option is selected,in other words

    If Forms![FUniversity]![HQ] = False Then
    Me.RecordSource = strScience

    The default value of the HQ is being set to False.
    However,on clicking the button in the form, the report opens with zero results.However, if i delete the condition If Forms![FUniversity]![HQ] = False Then
    from my code and write only Me.RecordSource = strScience, without any conditions, then then the reports opens perfectly.
    Probably there are peculiarities in the Option Group Controls that i do not know.May i ask for help?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Option Group Control (Access 2000)

    Put a break point on the line
    If Forms![FUniversity]![HQ] = False Then
    Look at the value of Forms![FUniversity]![HQ] when the program break and adjust you condition.
    Francois

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

    Re: Option Group Control (Access 2000)

    Generally (always?) option groups return numbers. Try changing the default value to a number.

    I would suggest that you add an option to the option group representing the default value. This allows users to return to the default value if they have clicked something else.
    Regards
    John



  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Option Group Control (Access 2000)

    <hr>Generally (always?) option groups return numbers <hr>
    Always. An option group returns the option value of the item selected, and that is always numeric.
    Charlotte

Posting Permissions

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