Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2015
    Posts
    5

    Unanswered: MS Access 2010 How to Auto Populate a Form Question

    Currently using Access 2010. Have an action item database with a rather simple form that among other things contains a Combo Box for selecting an action item's status (In Progress, Waiting, Deferred, Completed). I'd like to know if it's possible to auto populate a Text Box with the current date whenever an item's status is changed to Completed. The Text Box would stay empty until an item is Completed. Also, the date in the Text Box cannot be changed except to go blank if the status is changed from Completed back to one of the other status selection options in the Combo Box. Thanks very much for any help.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    In the after update event of the combo try:

    Code:
    If Me.ComboName = "Completed" Then
      Me.TextboxName = Date()
    Else
      Me.TextboxName = Null
    End If
    Paul

  3. #3
    Join Date
    Jan 2015
    Posts
    5

    MS Access 2010 How to Auto Populate a Form Question

    Quote Originally Posted by pbaldy View Post
    In the after update event of the combo try:

    Code:
    If Me.ComboName = "Completed" Then
      Me.TextboxName = Date()
    Else
      Me.TextboxName = Null
    End If
    pbaldy, thanks very, very, very much for following up with me! I have been racking my brain over this thing for 3 days and nothing was working. So when I saw your reply with code I immediately tried it. I followed the above instructions and today's date did get written to the Textbox. I closed the form and opened the Completed Tasks report, clicked on the title to re-open the form and the date had disappeared from the Textbox. I re-tried the process several times with the same results. The date keeps disappearing when the form is closed. Do you have any thoughts as to why the date keeps disappearing? Again, thank you very much for all your help!

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Is the textbox bound to a column in yhe table?
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jan 2015
    Posts
    5

    MS Access 2010 How to Auto Populate a Form Question

    Quote Originally Posted by healdem View Post
    Is the textbox bound to a column in yhe table?
    Thank you very much for your followup question. Actually, it's an unbound textbox.

  6. #6
    Join Date
    Jan 2015
    Posts
    5

    MS Access 2010 How to Auto Populate a Form Question

    Quote Originally Posted by e58531 View Post
    Thank you very much for your followup question. Actually, it's an unbound textbox.
    Folks, I bound the Textbox to the Completed Date column in the table and that solved the problem of the date disappearing from the textbox. Many, many thanks to you both for your tips and help. I'm so glad I found this site! Hopefully, someday I can contribute to this site and help to expand the body of knowledge. Thank you again for all your help folks! You folks are rock stars in my book!!

Posting Permissions

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