Toggle Button

  • Follow


Hi all

...in a form..i have a unbounded text field and a unbounded toggle button..on 
clicking the toggle button I want to change the value in the unbounded text 
field to Yes or No...how do I do this?

Thanks!

0
Reply Utf 3/30/2010 2:55:01 PM

In the click event of your toggle button put this code

If YourTextBoxName = "Yes" Then
    YourTextBoxName = "No"
Else
    YourTextBoxName = "Yes"
End If

"Peter" wrote:

> Hi all
> 
> ..in a form..i have a unbounded text field and a unbounded toggle button..on 
> clicking the toggle button I want to change the value in the unbounded text 
> field to Yes or No...how do I do this?
> 
> Thanks!
> 
0
Reply Utf 3/30/2010 3:06:01 PM


Peter wrote:
>..in a form..i have a unbounded text field and a unbounded toggle button..on 
>clicking the toggle button I want to change the value in the unbounded text 
>field to Yes or No...how do I do this?
>

Maybe all you need is to set the text box's expression to
something like:

	=IIf(togglebutton, "Yes", "No")

-- 
Marsh
MVP [MS Access]
0
Reply Marshall 3/30/2010 3:13:51 PM

Thanks You Ronaldo..but it does not work..should i assign a default value to 
the textbox?

"RonaldoOneNil" wrote:

> In the click event of your toggle button put this code
> 
> If YourTextBoxName = "Yes" Then
>     YourTextBoxName = "No"
> Else
>     YourTextBoxName = "Yes"
> End If
> 
> "Peter" wrote:
> 
> > Hi all
> > 
> > ..in a form..i have a unbounded text field and a unbounded toggle button..on 
> > clicking the toggle button I want to change the value in the unbounded text 
> > field to Yes or No...how do I do this?
> > 
> > Thanks!
> > 
0
Reply Utf 3/30/2010 3:48:01 PM

Nope..i put the Data Source of the Textbox =IIf([Toggle31],"Yes","No")..and i 
click on the toggle button..but nothing..starnge indeed

"Marshall Barton" wrote:

> Peter wrote:
> >..in a form..i have a unbounded text field and a unbounded toggle button..on 
> >clicking the toggle button I want to change the value in the unbounded text 
> >field to Yes or No...how do I do this?
> >
> 
> Maybe all you need is to set the text box's expression to
> something like:
> 
> 	=IIf(togglebutton, "Yes", "No")
> 
> -- 
> Marsh
> MVP [MS Access]
> .
> 
0
Reply Utf 3/30/2010 3:56:06 PM

The toggle button does not "toggle"..and no defualt values besides format 
Yes/No of the textbox

"Peter" wrote:

> Nope..i put the Data Source of the Textbox =IIf([Toggle31],"Yes","No")..and i 
> click on the toggle button..but nothing..starnge indeed
> 
> "Marshall Barton" wrote:
> 
> > Peter wrote:
> > >..in a form..i have a unbounded text field and a unbounded toggle button..on 
> > >clicking the toggle button I want to change the value in the unbounded text 
> > >field to Yes or No...how do I do this?
> > >
> > 
> > Maybe all you need is to set the text box's expression to
> > something like:
> > 
> > 	=IIf(togglebutton, "Yes", "No")
> > 
> > -- 
> > Marsh
> > MVP [MS Access]
> > .
> > 
0
Reply Utf 3/30/2010 4:03:01 PM

Got it...it does not work with a toggle button..but with a command 
button..the code ..Thanks both Ronaldo and Marshall!

"Peter" wrote:

> The toggle button does not "toggle"..and no defualt values besides format 
> Yes/No of the textbox
> 
> "Peter" wrote:
> 
> > Nope..i put the Data Source of the Textbox =IIf([Toggle31],"Yes","No")..and i 
> > click on the toggle button..but nothing..starnge indeed
> > 
> > "Marshall Barton" wrote:
> > 
> > > Peter wrote:
> > > >..in a form..i have a unbounded text field and a unbounded toggle button..on 
> > > >clicking the toggle button I want to change the value in the unbounded text 
> > > >field to Yes or No...how do I do this?
> > > >
> > > 
> > > Maybe all you need is to set the text box's expression to
> > > something like:
> > > 
> > > 	=IIf(togglebutton, "Yes", "No")
> > > 
> > > -- 
> > > Marsh
> > > MVP [MS Access]
> > > .
> > > 
0
Reply Utf 3/30/2010 4:08:01 PM

That doesn't make sense.  A Toggle button is just a
different looking check box.

The only way you would get that behavior is if you put the
toggle button in an option group.  In that case the
containing option group is set to the toggle button's
OptionValue instead of the button being set to True or False
and it would only toggle when you click on another toggle
button in the option group.
-- 
Marsh
MVP [MS Access]


Peter wrote:

>The toggle button does not "toggle"..and no defualt values besides format 
>Yes/No of the textbox
>
>"Peter" wrote:
>
>> Nope..i put the Data Source of the Textbox =IIf([Toggle31],"Yes","No")..and i 
>> click on the toggle button..but nothing..starnge indeed
>> 
>> "Marshall Barton" wrote:
>> 
>> > Peter wrote:
>> > >..in a form..i have a unbounded text field and a unbounded toggle button..on 
>> > >clicking the toggle button I want to change the value in the unbounded text 
>> > >field to Yes or No...how do I do this?
>> > >
>> > 
>> > Maybe all you need is to set the text box's expression to
>> > something like:
>> > 
>> > 	=IIf(togglebutton, "Yes", "No")
0
Reply Marshall 3/30/2010 6:08:38 PM

high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD 
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price?  China 
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can 
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are 
the best brand replica goods whih are look the same as the original goods. 
excellent quality and steady supply for them. we have been marketed in Europe 
and American for 3 year. all the goods we offer are AAA quality.  our soccer 
jersey are Thailand style. If any goods you buy from my company have problem, 
we will refund or resend them again. Most of ourProducts have no minimum 
order requirements,soyou can shop retail goods at wholesale prices. if you 
can buy more than 300usd. We offer free shipping. The more you buy the more 
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping.  7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
0
Reply Utf 3/31/2010 8:09:02 PM

8 Replies
702 Views

(page loaded in 0.189 seconds)

Similiar Articles:













8/1/2012 2:11:38 PM


Reply: