Radio Button UNDO

  • Thread starter RedHeadedMonster via AccessMonster.com
  • Start date
R

RedHeadedMonster via AccessMonster.com

I've created a form for customer. They want a Option Group with 2 selections
- Complete & Not required. I got it set up working fine.

Now for the problem. They want to be able to UNDO if they click a button
prematurely. So if they mistakingly click complete & the process is not
complete they've like to be able to deselect. Cant seem to find anything.

Is there anyway, if the button is selected already, you could click it again
and deselect it?

Thanx
RHM
 
A

Arvin Meyer [MVP]

The code in the button is a single line reading:

Me.OptionGroupName = Null

where OptionGroupName is the name of the Option Group
 
R

RedHeadedMonster via AccessMonster.com

And where do I put this code?
The code in the button is a single line reading:

Me.OptionGroupName = Null

where OptionGroupName is the name of the Option Group
I've created a form for customer. They want a Option Group with 2
selections
[quoted text clipped - 10 lines]
Thanx
RHM
 
A

Arvin Meyer [MVP]

Add an UNDO button to the form and use the click event of that button to
create an [Event Procedure].
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


RedHeadedMonster via AccessMonster.com said:
And where do I put this code?
The code in the button is a single line reading:

Me.OptionGroupName = Null

where OptionGroupName is the name of the Option Group
I've created a form for customer. They want a Option Group with 2
selections
[quoted text clipped - 10 lines]
Thanx
RHM
 
R

RedHeadedMonster via AccessMonster.com

Can it not be done without adding another button to the form?
Add an UNDO button to the form and use the click event of that button to
create an [Event Procedure].
And where do I put this code?
[quoted text clipped - 8 lines]
 
A

Arvin Meyer [MVP]

Windows and Access are event driven. That means you need an event to put the
code in. A button's click event is the most logical, but you can put it in
any event that will fire at your direction. Now you could get fancy and do
something like:

Private Sub cmdComplete_Click()
If Me.cmdComplete.Caption = "Complete" Then
'Whatever the code is that you have now
Me.cmdComplete.Caption = "Incomplete"
Else
Me.OptionGroupName = Null
Me.cmdComplete.Caption = "Complete"
End If
End Sub

Now the button will do double duty.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


RedHeadedMonster via AccessMonster.com said:
Can it not be done without adding another button to the form?
Add an UNDO button to the form and use the click event of that button to
create an [Event Procedure].
And where do I put this code?
[quoted text clipped - 8 lines]
Thanx
RHM
 

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