Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / April 2007

Tip: Looking for answers? Try searching our database.

Option button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ashby - 22 Feb 2007 03:01 GMT
when an option button is selected I want to link it to a field in a table
with a yes/no value

ie
Table = Product Group
field = Tube (yes/no)

if option button is selected then tbe = yes.

How can I achieve this?

Thanks Ashby
Damian S - 22 Feb 2007 03:49 GMT
Hi Ashby,

Use a checkbox rather than an option button.

Damian.

> when an option button is selected I want to link it to a field in a table
> with a yes/no value
[quoted text clipped - 8 lines]
>
> Thanks Ashby
Ashby - 22 Feb 2007 04:04 GMT
Really it would be the same problem with the checkbox gining a true/false
,-1/0 answer...

> Hi Ashby,
>
[quoted text clipped - 14 lines]
> >
> > Thanks Ashby
Damian S - 22 Feb 2007 04:48 GMT
I am assuming your form is getting its data from the Product Group table.  If
so, place a checkbox on yoru form and set its data source to "Tube".  It will
then save the value into the Tube field of the Product Group table when
someone clicks on it.

Is this what you are meaning?  If not, can you provide a little further
information please.

Damian.

> Really it would be the same problem with the checkbox gining a true/false
> ,-1/0 answer...
[quoted text clipped - 17 lines]
> > >
> > > Thanks Ashby
PCH - 22 Feb 2007 06:07 GMT
Hi damian

I've got about thirty different product types.
If I insert a frame on a form and link-bound the option buttons to store
their vaule in the field say "product type" I can only use 20 option buttons.

If a split these groups into two, making two frames with fifteen option  
buttons in each,  I run the risk of entering "two values" into the field...

I was really looking to create a frame with as many options as I'd like,
where only one is selected and it's product group updated to the filed.

> I am assuming your form is getting its data from the Product Group table.  If
> so, place a checkbox on yoru form and set its data source to "Tube".  It will
[quoted text clipped - 27 lines]
> > > >
> > > > Thanks Ashby
Damian S - 22 Feb 2007 06:31 GMT
If you have 30 different product types, and it's only possible to have a
single product type selected, you should have the product types in a lookup
list (table) that is linked to your main table.  Then you can have a single
combo box to display your 30 items and the user can only select one.  If you
need a new product type, you simply add it into your table.  Here's a sample:

tlkProductTypes
 ProductTypeID autonumber
 ProductType text

tblProduct
 ProductID
 ProductName
 ProductTypeID

See what I mean?

Damian.

>  Hi damian
>
[quoted text clipped - 39 lines]
> > > > >
> > > > > Thanks Ashby
John Spencer - 22 Feb 2007 17:30 GMT
I agree with Damian that a combobox makes much more sense in this situation
(or a listbox as second choice).

The 20 option limit is a limit of the wizard and not of the option group.
You can add more choices to the option group after the wizard creates the
option box with the first 20.  Once the wizard has finished, click on the
option button or check box in the toolbar and then click inside the option
control (frame) - you will now have another option available.  Repeat as
many times as you wish (there is an upper limit as to the number of controls
on a form.)

But with this many choices, I would suggest the a combobox makes much more
sense in terms of space required on the form and in terms of ease-of-use and
ease of modification.
Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> If you have 30 different product types, and it's only possible to have a
> single product type selected, you should have the product types in a
[quoted text clipped - 68 lines]
>> > > > >
>> > > > > Thanks Ashby
Harry - 20 Apr 2007 14:24 GMT
Just create within your table;
fieldname   data type
tbe             yes/no
This creates a checkbox in your table. checked=yes unchecked= no.
Working with its status can be done as
if me.tbe = true then "Whatever you want"

Harry

> when an option button is selected I want to link it to a field in a table
> with a yes/no value
[quoted text clipped - 8 lines]
>
> Thanks Ashby
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.