Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Posts
    6

    Unanswered: Simple toggle with checkbox help!

    Hi!
    It sound simple but I need help.
    I want to enter the current date in a field (closed date) when a check mark is clicked.

    I have an if that if it's null to exit. but on value how would i enter the info? Any ideas?

    Thanks.

  2. #2
    Join Date
    May 2009
    Posts
    258
    Something like the following should do it:
    Code:
    Me.Closed_Date = IIf(Checkbox.Value, Date, "")

  3. #3
    Join Date
    Jul 2009
    Posts
    6
    That would be on the text box. I'm trying to get the checkbox to send the information because that way on selecting it gives the date and on unselecting it does nothing. This is what i got so far:

    Private Sub CA_not_Needed_Click()
    If IsNull(Me![CA not Needed]) Then
    Exit Sub
    End If

    End Sub


    Adding Today() gives me an error as undefined
    Last edited by Adbmore; 07-09-09 at 15:11.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Code:
    Private Sub CA_not_Needed_AfterUpdate()
       If Me.[CA not Needed] = TRUE Then
          Me.MyDateField = Date()
       End If
    End Sub
    Is this what you need?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Jul 2009
    Posts
    6
    Yes!
    Thanks that'll work.
    shorter than what i had

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Cool and you're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •