Toggle buttons and Text boxes

  • Thread starter nilrickbl via AccessMonster.com
  • Start date
N

nilrickbl via AccessMonster.com

HELP!!
I am creating a form which will have several toggle buttons.
Once these toggle buttons are clicked, a value will show in the bound text
box.
Now my questions:
1) I have edit the toggle buttons to show the value I want when clicked, but
when clicked again, i would hope it clear the bound textbox. But it does not,
the text box still contains the previous value.
This is what Im using for the toggle button value:
If Toggle17 = True Then
ACC = "18B"
Else
ACC = Null
End If
How can I get the text box to remove the value when the toggle is clicked
again.

2) I have several toggle bound to the same text box, how can I have all the
values displayed at the same time?

Thanks for any help.
Nil
 
R

Ron2006

Put that code in the afterupdate event

If they are all supposed to be used to set the value of the same
txtbox then you should probably be using an option group and supply
one option to set the field to null so that it can be set back to
empty.

In the afterupdate event of the option group use if then elseif then
etc or use a select function logic.

If you are trying to concatenate the values into the same txtbox then
we would ask why since that is usually a bad idea putting multiple
values in the same field. but it would be the follows

If Toggle17 = True Then
ACC = acc & "18B"
else
................
subtracting the value entered would be more
difficult. probably need to use a
replace(me.add,"18b","") or something like that.
There is no easy way to force the unset to be done right after the
set.
...............
End If

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top