Results 1 to 4 of 4
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    AfterUpdate VBA suddenly doesn't immediately show change

    I've got a DB of complaints and a form to look at each individually. I have some code where if the user marks a combo box as 'Complete', then today's date populates in a date field to signify when it was completed.



    Kind of outta no where, the date no longer immediately pops up unless I quick in the date field itself or if I change records and then go back. Ultimately its a small issue because it populates no matter what, but I just thought it was so weird that it doesn't instantly appear anymore. Some users thought it wasn't populating at all but it is. It's just not showing unless you change records or click it.

    I was curious to know if anyone has ever seen this happen.

    Here's the code in the form:

    Code:
    Private Sub ComboStatus_AfterUpdate()
        If Me.comboStatus = "Completed" Then Me.ComplaintCompletedDate = Date
    End Sub

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the afterupdate event will run if the user changes the value in the box and
    Me.comboStatus = "Completed". Case may be a factor.

    it will not run if vb code sets the cboStatus.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You could try (untested)
    Code:
    Private Sub ComboStatus_AfterUpdate()
        If Me.comboStatus = "Completed" Then
           Me.ComplaintCompletedDate = Date
           Me.Refresh
        End If
    End Sub

  4. #4
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    That worked! Thanks!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 05-16-2021, 08:10 AM
  2. Replies: 7
    Last Post: 05-21-2020, 03:48 PM
  3. Replies: 3
    Last Post: 04-18-2018, 09:10 AM
  4. Replies: 3
    Last Post: 07-22-2015, 04:37 PM
  5. Calendar doesn't show
    By ronni in forum Forms
    Replies: 5
    Last Post: 07-24-2014, 09:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums