Results 1 to 6 of 6
  1. #1
    MDAO is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    20

    FORM: Fill one blank and others must be left empty?

    Hi there,

    Is there a way that you can link some of the entries in a form or a database, so that when you enter data in one of them, the other ones must be left empty?



    Thanks.
    Regards,
    Dao

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Why MUST be left empty?

    Code can do whatever you want. Is this related to your other thread about 'carry over' data?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    MDAO is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    20
    It's a little bit too complicated to explain. But say, there are 4 boxes. In any record, I just want only one of the four (anyone of them) contain data. If you enter data into box A, you can't put data into any of the other, so on so forth.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Why do you have 4 boxes that are mutually exclusive? Are there 4 fields these boxes are bound to? If so, should probably be one field then use a combobox with 4 choices.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    MDAO is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    20
    There are 4 fields that the boxes are bound to, but I can't use a combo-box with 4 choices for that. They are 4 different things that are not related. But it just happens in my form that when you fill one, you don't will the other three.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Very odd. Just the fact that only one is allowed does mean they have some sort of relationship.

    Code in each control AfterUpdate event that sets the others as disabled would work if the form is Single view. Then also need code in the form Current event to make them all enabled.

    Otherwise, try Conditional Formatting for each control.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. How to query if date field is left blank?
    By McArthurGDM in forum Queries
    Replies: 9
    Last Post: 08-04-2014, 05:18 PM
  2. warning message if field is left blank
    By dimoc in forum Access
    Replies: 3
    Last Post: 04-10-2014, 03:20 PM
  3. Replies: 4
    Last Post: 05-11-2013, 07:51 AM
  4. Left Hand column in chart empty
    By Kirsti in forum Reports
    Replies: 10
    Last Post: 03-20-2012, 01:41 PM
  5. Replies: 1
    Last Post: 07-25-2011, 09:57 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