Toggle versus Command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to change a toggle button into a command button? How can this
be done without having to recreate a button. Thanks
 
Yes... the toggle control has an OnClick event. You could run code there...
Probably, you'll want to determine what value the toggle has at the time
(True/False), and run different code accordingly.
hth
Al Camp
 
Still looks like a toggle button to me as it appears pushed in when clicked.
OnClick event works and brings up the proper document but I do not want the
'button' to look pushed in. Command buttons do not appear this way in my db
but toggle buttons do.
Properties appear different for both in that:
Under the data tab the command button item only has one entry for enabled
Under the data tab the toggle button item has 7 possible entries including
enabled.

The toggle button data tab also has: control source, Default Value,
Validation Rule, Validation Text, Enabled, Locked, Triple State,, plus there
are other differences on other tabs.

There must be some significant difference between the choice of toggle or
command that I am missing.
 
Slow Learner said:
Still looks like a toggle button to me as it appears pushed in when clicked.
OnClick event works and brings up the proper document but I do not want the
'button' to look pushed in. Command buttons do not appear this way in my db
but toggle buttons do.
Properties appear different for both in that:
Under the data tab the command button item only has one entry for enabled
Under the data tab the toggle button item has 7 possible entries including
enabled.

The toggle button data tab also has: control source, Default Value,
Validation Rule, Validation Text, Enabled, Locked, Triple State,, plus there
are other differences on other tabs.

There must be some significant difference between the choice of toggle or
command that I am missing.

You cannot convert it. If you delete the toggle and then create a Command
Button with the same name all you have to do is restore the "[Event Procedure]"
setting for the OnClick property and your code will still be there and run.
 
Thank you for your help. Now the next question would be how to restore and
Event Procedure?

Rick Brandt said:
Slow Learner said:
Still looks like a toggle button to me as it appears pushed in when clicked.
OnClick event works and brings up the proper document but I do not want the
'button' to look pushed in. Command buttons do not appear this way in my db
but toggle buttons do.
Properties appear different for both in that:
Under the data tab the command button item only has one entry for enabled
Under the data tab the toggle button item has 7 possible entries including
enabled.

The toggle button data tab also has: control source, Default Value,
Validation Rule, Validation Text, Enabled, Locked, Triple State,, plus there
are other differences on other tabs.

There must be some significant difference between the choice of toggle or
command that I am missing.

You cannot convert it. If you delete the toggle and then create a Command
Button with the same name all you have to do is restore the "[Event Procedure]"
setting for the OnClick property and your code will still be there and run.
 
Slow Learner said:
Thank you for your help. Now the next question would be how to restore and
Event Procedure?

Go to the OnClick property of the CommandButton and choose "[Event
Procedure]" from the drop-down list of choices.
 
Back
Top