Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2017
    Posts
    2

    Answered: Auto Fill Date Field Upon Combo Box Selection

    Hello everyone,

    Access Novice here, so please bare with me.

    I have a combo box with 3 selections - Active, Resolved and Closed. I have a closed date field on the form and I would like to set it to when the user selects the Closed option in the combo box, the closed date field auto populates with that days date.

    Any help would be greatly appreciated.

    Thanks,

    Mike

  2. Best Answer
    Posted by weejas

    "Assuming the following:
    • The combo box is called cmbStatus
    • The date closed field is called txtDateClosed

    Then in the combo box's Change event, you'll need something like:
    Code:
    If cmbStatus.Value = "Closed" Then txtDateClosed = Date()
    "


  3. #2
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,102
    Provided Answers: 17
    Assuming the following:
    • The combo box is called cmbStatus
    • The date closed field is called txtDateClosed

    Then in the combo box's Change event, you'll need something like:
    Code:
    If cmbStatus.Value = "Closed" Then txtDateClosed = Date()
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

  4. #3
    Join Date
    Jun 2017
    Posts
    2
    That was the ticket! Works like a charm. Thank you very much.

  5. #4
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    1,102
    Provided Answers: 17
    You're welcome!
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Tags for this Thread

Posting Permissions

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