次の方法で共有


オプション グループ コントロール

適用先: Access 2013 | Access 2016

フォームまたはレポートのオプション グループに、オプションで選択できる値のセットが表示されます。 オプション グループを使うと、必要な値をクリックするだけで値を選択できます。 オプション グループのオプションは、一度に 1 つしか選択できません。

オプション グループは、複数のチェック ボックス、トグル ボタン、またはオプション ボタンとグループ フレームで構成されています。

注釈

If an option group is bound to a field, only the group frame itself is bound to the field, not the check boxes, toggle buttons, or option buttons inside the frame. Instead of setting the ControlSource property for each control in the option group, you set the OptionValue property of each check box, toggle button, or option button to a number that's meaningful for the field to which the group frame is bound. When you select an option in an option group, Microsoft Access sets the value of the field to which the option group is bound to the value of the selected option's OptionValue property.

注:

オプション グループの値には数値しか設定できず、テキストを設定することはできないので、"OptionValue/オプション値" プロパティには数値が設定されます。 Microsoft Access stores this number in the underlying table. In the preceding example, if you want to display the name of the shipper instead of a number in the Orders table, you can create a separate table called Shippers that stores shipper names, and then make the ShipVia field in the Orders table a Lookup field that looks up data in the Shippers table.

オプション グループは、式に設定したり、非連結にすることができます。 カスタム ダイアログ ボックスでバインドされていないオプション グループを使用してユーザー入力を受け入れ、その入力に基づいてアクションを実行します。

関連項目

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。