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 / Forms / March 2005

Tip: Looking for answers? Try searching our database.

Select/deselect a Yes/No control based on a date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kw_uh97 - 16 Mar 2005 18:21 GMT
How can I select/deselect a Yes/No control based on a date control on the
same form. Based on the research I've done through the discussion board. I
think the AfterUpdate procedure on the date control is where I should place
my code. If the date is 30 days passed the Current Date() the Yes/No should
be false. I would greatly appreciate the code structure to make this happen.

Thanks In Advance
kw
Jason - 16 Mar 2005 22:39 GMT
You are correct... you will want to put the code in the AfterUpdate event of
the date control.  You've basically already written the code with your
explanation.  Of course you will want to replace my control names with the
actual ones:

Private Sub txtDate_AfterUpdate()
 If Me.txtDate < Date() - 30 Then
      Me.chkYesNo = False
 Else
      Me.chkYesNo = True
 End If
End Sub

> How can I select/deselect a Yes/No control based on a date control on the
> same form. Based on the research I've done through the discussion board. I
[quoted text clipped - 4 lines]
> Thanks In Advance
> kw
kw_uh97 - 17 Mar 2005 19:33 GMT
Jason

Works perfectly! Thanks for everything and the words of encouragement.

kw

> You are correct... you will want to put the code in the AfterUpdate event of
> the date control.  You've basically already written the code with your
[quoted text clipped - 17 lines]
> > Thanks In Advance
> > kw
 
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.