Results 1 to 6 of 6
  1. #1
    chemengr is offline Novice
    Windows 98/ME Access 97
    Join Date
    Sep 2010
    Posts
    2

    Limit data entry based on another field

    I would like to limit the data entry to a field based on a data entry from another field.



    For example, if the data entry for the field "Paid" is "True" then only the field "Name" can be populated. If the field "Paid" is "False", then only the fields "Reason" and "Due Date" can be populated. Thanks in advance for the help.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    depending on what you want to see in the form, you can visible your controls after an event of your choice:
    Code:
    if me.paid = "true" then
       for each c in me.controls
          if c.name <> "name" then
             c.visible = false
          end if
       next c
    end if

  3. #3
    chemengr is offline Novice
    Windows 98/ME Access 97
    Join Date
    Sep 2010
    Posts
    2
    Can this be done in the design view of the form? If not, is there a way to control this using the design view?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by chemengr View Post
    Can this be done in the design view of the form? If not, is there a way to control this using the design view?
    that is code that you put behind a control event. the code runs while you operate the form in form mode.

  5. #5
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    I'm resurrecting this thread because it is the closest I can find to my issue. I have been googling / searching the forum at length, and I feel like I'm missing something really simple.

    I have a field successfully accessing a row source of a field from another table. Hooray!

    Important: we cannot have values input that are not in the row source tbl:field, ever, on any form. So I want to restrict it at the table level. I'm expecting a field property that prevents input other than from the row source. I am not 'getting it'. I try the expression builder and it doesn't include tables / fields.

    Help so appreciated,

    Kay
    from Toronto

  6. #6
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    Found it! Duh. "Limit to List" property. I hate to do that to the forum: easy question, obvious answer was obvious after stepping away for a moment. Sort of like staring at something in the fridge and not seeing it. Oh well. Maybe my question in here will save someone else the same extra bit of time in the future.

    Continued thanks for the wonderful forum! I usually find applicable threads to my questions really quickly.

    Kay
    still in Toronto

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

Similar Threads

  1. Populate one field based upon another fields data
    By BigBrownBear in forum Queries
    Replies: 1
    Last Post: 03-23-2010, 04:27 PM
  2. Replies: 4
    Last Post: 02-08-2010, 11:17 AM
  3. Can't get new field to show in my data entry form
    By Suzie in forum Database Design
    Replies: 19
    Last Post: 12-21-2009, 03:48 PM
  4. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  5. Total based on Formula based on field value
    By cjbuechler in forum Reports
    Replies: 15
    Last Post: 07-10-2009, 09:56 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