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 Programming / October 2006

Tip: Looking for answers? Try searching our database.

On Click Even with If Statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Curtis Stevens - 27 Oct 2006 17:51 GMT
I'm having a little trouble.

Discover Paid (a check box)
Discover Paid Date (a text box)

Discover Paid Control Name = DiscoverPaid
Discover Paid Date Control Name = DiscoverPaidDate

When I click on the check box for Discover's been Paid, it will then put
today's date into the Paid Date box, but only if it is checked, value = Yes.  
But when you uncheck it, it clears the text box, so there is only a date when
the check box is checked and always empty when not checked or has been
unchecked.

I'm assuming you put this code in the on click event?  I'm having trouble
with the coding too.  :)

Thanks for your help!

Curtis
Curtis Stevens - 27 Oct 2006 18:01 GMT
I figured it out, woo hoo!  I kept trying Yes, No, etc.  True/False was the
prob!

If Me.DiscoverPaid = True Then Me.DiscoverPaidDate = Date
If Me.DiscoverPaid = False Then Me.DiscoverPaidDate = Null
ruralguy - 27 Oct 2006 18:07 GMT
<< AIR CODE >>
Private Sub DiscoverPaid_Click()

If Me.DiscoverPaid Then
   Me.DiscoverPaidDate = Date()
Else
   Me.DiscoverPaidDate = Null
End If

End Sub

>I'm having a little trouble.
>
[quoted text clipped - 16 lines]
>
>Curtis

Signature

HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

 
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.