Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2006

Tip: Looking for answers? Try searching our database.

Reset option group to null

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doug F. - 03 Feb 2006 19:58 GMT
I have an option group with 5 radio buttons, if at data entry the operator
mistakenly clicks a button yet didn't want any of the 5 then I want to set
the option group back to null, the default. The control is a number, integer.
I would be happy to have a button when clicked sets the control to null.
Thanks.
Signature

Doug F.

Douglas J Steele - 03 Feb 2006 20:31 GMT
Simply set the frame object that contains the radio buttons to Null, as in:

Me.Frame4 = Null

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> I have an option group with 5 radio buttons, if at data entry the operator
> mistakenly clicks a button yet didn't want any of the 5 then I want to set
> the option group back to null, the default. The control is a number, integer.
> I would be happy to have a button when clicked sets the control to null.
> Thanks.
Doug F. - 04 Feb 2006 18:15 GMT
Great, thank you.
Signature

Doug F.

> Simply set the frame object that contains the radio buttons to Null, as in:
>
[quoted text clipped - 6 lines]
> > I would be happy to have a button when clicked sets the control to null.
> > Thanks.
Sarah W. - 16 Jun 2006 22:07 GMT
I'm in the same boat, but I'm not sure how to set the frame to null.  Is this
so that the user can click off of the options and clear the option box?  

Where can one put this code in?  Any help is greatly appreciated

> Great, thank you.
>
[quoted text clipped - 8 lines]
> > > I would be happy to have a button when clicked sets the control to null.
> > > Thanks.
strive4peace - 17 Jun 2006 01:59 GMT
Hi Sarah,

"Is this so that the user can click off of the options and
clear the option box? "

yes

"Where can one put this code in?"

make a command button and put the code in the [Event
Procedure] for the Onclick event of your command button

there are other places you could put it too, but this may be
easiest for you.

turn on the properties window if it is not showing
from the menu --> View, Properties

ie: make a command button

OTHER tab:
Name --> cmdClearWhatever
ControlTipText --> (ie:) Clear Options

FORMAT tab:
Caption --> X
ForeColor --> DarkRed
Width --> 0.2
Height --> 0.2

EVENT tab:
click in the OnClick event
click the builder button (...) to the right and choose "Code
Builder"

this takes you to a module window between the procedure
declaration (Private Sub cmdClearWhatever_Click() and End Sub)

type Me.

then you will be prompted with control names -- type the
name of the frame control or pick it from the list

then =Null

your statement will end up like this:

'~~~~~~~~~~~
me.controlname = null
'~~~~~~~~~

Whenever you write code, your should ALWAYS compile it
before you attempt to run it.

from the menu: Debug, Compile

fix any errors on the yellow highlighted lines

keep compiling until nothing happens (this is good!)

Warm Regards,
Crystal
Microsoft Access MVP 2006

 *
       Have an awesome day ;)

  remote programming and training
  strive4peace2006 at yahoo.com

 *

> I'm in the same boat, but I'm not sure how to set the frame to null.  Is this
> so that the user can click off of the options and clear the option box?  
[quoted text clipped - 15 lines]
>>>>I would be happy to have a button when clicked sets the control to null.
>>>>Thanks.
Sarah W. - 26 Jun 2006 20:43 GMT
Thank you so much!  It worked perfectly.  I really appreciate your time.  

> Hi Sarah,
>
[quoted text clipped - 87 lines]
> >>>>I would be happy to have a button when clicked sets the control to null.
> >>>>Thanks.
strive4peace - 27 Jun 2006 00:25 GMT
you're welcome, Sarah :)  happy to help

Warm Regards,
Crystal
Microsoft Access MVP 2006

 *
       Have an awesome day ;)

  remote programming and training
  strive4peace2006 at yahoo.com

 *

> Thank you so much!  It worked perfectly.  I really appreciate your time.  
>
[quoted text clipped - 89 lines]
>>>>>>I would be happy to have a button when clicked sets the control to null.
>>>>>>Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.