Results 1 to 2 of 2
  1. #1
    AccessGill is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    1

    Access 2007; Autofill a form field depending upon the value of another Field

    Hi, I am new to Access 2007 and I am having trouble in creating a form.



    It is simply a data storage table which would be fed in by users. That it.

    I need to create a user friendly form so that :

    When the user selects : Career_Goal field as "None", the next field called: Years, should be automatically be populated as 0.
    In any other case, they should be able to select the years from the dropdown list.

    How do I create this if else conditions? Do I use expression builder, if yes then how?

    Grateful for your help.

    Thanks

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    In the After Update event of Career_Goal, you could have something like this (Event Procedure):

    If Career_Goal = "None" then
    [years] = 0
    [years].enabled=false ' Don't let the user change it
    else
    [years].enabled = true
    endif

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

Similar Threads

  1. Replies: 2
    Last Post: 07-14-2011, 09:23 AM
  2. Replies: 3
    Last Post: 06-20-2011, 09:30 AM
  3. Replies: 2
    Last Post: 04-04-2011, 02:18 PM
  4. Replies: 9
    Last Post: 12-15-2010, 01:44 PM
  5. Autofill form fields based on another field
    By ljs1277 in forum Access
    Replies: 3
    Last Post: 02-16-2010, 02:51 PM

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
  •  
Other Forums: Microsoft Office Forums