Results 1 to 4 of 4
  1. #1
    Suzemt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    3

    Auto Fill a form

    I would like a field on a form to auto fill with a phrase after I have entered data into another field.



    So if I type Yes and field A then Field B updates to Not Decided. If I type No in field A, then Field B updates to Not Applicable.

    Any ideas?

    Thanks in advance.

  2. #2
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    use the after update events on the fields

    fieldA after update event
    select Case me.fieldA
    Case = "Yes"
    me.fieldb = "not decided"
    Case = "No"
    me.fieldb= "Not Applicable"
    end select

    give it a try..

    you could use 2 if statements as well..
    or a if and else if as well.
    or a if and else only.. if you know this is only a Yes and no option
    if me.fieldA = "Yes"
    me.fieldB = "ND"
    else
    me.fieldB = "NA"
    End if

  3. #3
    Suzemt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    3

    Thumbs up Fan - Flippin' - tasatic

    Quote Originally Posted by alcapps View Post
    use the after update events on the fields

    fieldA after update event
    select Case me.fieldA
    Case = "Yes"
    me.fieldb = "not decided"
    Case = "No"
    me.fieldb= "Not Applicable"
    end select

    give it a try..

    you could use 2 if statements as well..
    or a if and else if as well.
    or a if and else only.. if you know this is only a Yes and no option
    if me.fieldA = "Yes"
    me.fieldB = "ND"
    else
    me.fieldB = "NA"
    End if

    Absolute Genius. Thank you so very, very much.

  4. #4
    Suzemt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    3

    Just one more thing

    Quote Originally Posted by Suzemt View Post
    Absolute Genius. Thank you so very, very much.
    Could you just tweak it slightly to that I can do exactly the same but fieldb would be on a different form?

    Thanks in advance

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

Similar Threads

  1. Replies: 3
    Last Post: 03-21-2012, 01:43 PM
  2. Auto-Fill text fields in the form
    By sk88 in forum Access
    Replies: 2
    Last Post: 01-10-2012, 08:22 PM
  3. Auto fill a form
    By dreli_20 in forum Forms
    Replies: 11
    Last Post: 11-09-2011, 06:24 PM
  4. Multiple Auto Fill in Form
    By mwebster in forum Forms
    Replies: 1
    Last Post: 07-06-2011, 10:39 AM
  5. Replies: 2
    Last Post: 06-21-2011, 10:08 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