Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    10

    Unanswered: option groups and option values

    I have created an option group with 4 radio buttons - option values 1-4. Now I want to say if that the button selected is the first button in the group, do specific actions using a macro. I tried putting

    [Forms]![Data_File_Selection_Interprise]![OPTGRP_INFRA].[OptionValue]=1
    in the condition column of the macro - also tried many other syntaxs but just can't get it too work.

    Would really appreciate your help.

  2. #2
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Re: option groups and option values

    Originally posted by dambros
    I have created an option group with 4 radio buttons - option values 1-4. Now I want to say if that the button selected is the first button in the group, do specific actions using a macro. I tried putting

    [Forms]![Data_File_Selection_Interprise]![OPTGRP_INFRA].[OptionValue]=1
    in the condition column of the macro - also tried many other syntaxs but just can't get it too work.

    Would really appreciate your help.
    You can write following code :

    Code:
    public sub optgrp_infr_AfterUpdate()
       select case optgrp_infra.value
          case 1: Docmd.RunMacro 'name of first macro'
          case 2: Docmd.RunMacro 'name of second macro'
          ........
       end select
    end sub

Posting Permissions

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