PC Review


Reply
Thread Tools Rate Thread

Binding a option button to a field???

 
 
=?Utf-8?B?QWNjZXNzIEhlbHA=?=
Guest
Posts: n/a
 
      23rd Jul 2007
Hi all,
Can anyone tell me how to bind a option button to a field in a table?
thanks
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      23rd Jul 2007
If the option button is part of an option group, you can bind the option
group to a Number field in your table. For an example, open the Northwind
sample database that installs with Access, and see how the Ship Via option
group works on the Orders form. (They use check boxes, but option buttons
work the same.)

If the option button is not part of a group, you can bind it to a yes/no
field in the table. It toggles between two states: chosen and not chosen.

Whatever you do, don't create a heap of option buttons each bound to yes/no
fields. Explanation in this article:
Don't use Yes/No fields to store preferences
at:
http://allenbrowne.com/casu-23.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Access Help" <(E-Mail Removed)> wrote in message
news:1848FBFF-C523-4FF5-A567-(E-Mail Removed)...
> Hi all,
> Can anyone tell me how to bind a option button to a field in a table?
> thanks


 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      23rd Jul 2007
"Access Help" <(E-Mail Removed)> wrote in message
news:1848FBFF-C523-4FF5-A567-(E-Mail Removed)...
> Hi all,
> Can anyone tell me how to bind a option button to a field in a table?
> thanks


The easiest way to bind fields to controls is to use the Field Selector
(from the view menu) and drag the field to the form. The default control for
that datatype is chosen. You can also, first choose a control, then select a
field and drag it to the form.

An Option button can only be directly bound to a Boolean (yes/no) field. To
do so, add the field to the form and you'll most likely get a check box
control, right-click and choose Change To, then from the menu choose Option
Button.

If you have multiple values with a series of Option Buttons in a Frame,
click on the Option Group itself to select the frame and set the Data's
ControlSource value to the field.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help on how to grey out one option button in one group box based on the selection of another option button in another group box George Microsoft Excel Programming 13 11th Mar 2007 02:08 PM
Binding Values from a Table to Option Buttons contained in an Option Group faerewing@gmail.com Microsoft Access 3 15th Jan 2007 10:01 PM
Scanning Option Group (VB 6 Option Button Control Array) Michael D. Ober Microsoft VB .NET 6 21st Jun 2006 06:55 AM
Auto advance to next field -tab key AND option button to reset fie =?Utf-8?B?fktP?= Microsoft Excel Programming 0 1st Mar 2006 09:35 PM
Option Button to Enable Field? Tony Microsoft Outlook Form Programming 4 14th Aug 2003 03:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 AM.