Results 1 to 3 of 3
  1. #1
    Xterra14s is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    May 2016
    Posts
    32

    Auto populate field based on another field using after update event

    Hello, I'm looking to do the following:

    I have four fields involved in this section called: Specialty, consult, Followup, and Urgency. What I'm looking to do is have consult, followup, and urgency update with No, No, Not Urgent when specialty is Xray selected from a drop down. I believe this can be done with a iif event in the after update event for each.



    I know how to write it in words but not sure how to do it with code. I want the following: If specialty is "X-ray" then follup is "No". I believe this statement would have to be entered for each of the fields.

    Thank you for the help!

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Hi, what are the possible values in the urgency field?

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Use VBA, specifically the AfterUpdate event of the Specialty combo box, i.e.
    Code:
    Private Sub Specialty_AfterUpdate()
    
        If Me.Specialty = "X-ray" Then
            Me.Consult = "No"
            Me.Followup = "No"
            Me.Urgency = "Not Urgent"
        End If
        
    End Sub

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

Similar Threads

  1. Auto-populate 1 field based on 2 fields
    By Ray Peterson in forum Queries
    Replies: 3
    Last Post: 11-10-2015, 12:42 PM
  2. Replies: 2
    Last Post: 12-04-2013, 05:38 PM
  3. Replies: 7
    Last Post: 11-28-2012, 01:41 PM
  4. Replies: 3
    Last Post: 10-03-2011, 02:33 PM
  5. Replies: 3
    Last Post: 10-05-2009, 07:22 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