Toggle Button

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

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!
 
In the click event of your toggle button put this code

If YourTextBoxName = "Yes" Then
YourTextBoxName = "No"
Else
YourTextBoxName = "Yes"
End If
 
Nope..i put the Data Source of the Textbox =IIf([Toggle31],"Yes","No")..and i
click on the toggle button..but nothing..starnge indeed
 
The toggle button does not "toggle"..and no defualt values besides format
Yes/No of the textbox

Peter said:
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 said:
Maybe all you need is to set the text box's expression to
something like:

=IIf(togglebutton, "Yes", "No")
 
Got it...it does not work with a toggle button..but with a command
button..the code ..Thanks both Ronaldo and Marshall!

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

Peter said:
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 said:
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")
 
Back
Top