Results 1 to 2 of 2
  1. #1
    jaworski_m is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2015
    Posts
    25

    Limited number of entries in a subform with data validation

    Hello,

    I have a form where currencies are chosen for a Purchase Order (PO).
    More then one currency can be defined for a single PO, but 3 is max.

    Currency groups:
    (1) EUR, USD
    (2) (other currencies: GBP, CHF, other1, other2, ..., other n)

    Currencies from group (1) can ALWAYS be selected but only ONE from group (2) can be chosen.

    For example (max 3, min 1):
    CORRECT choices:
    - EUR, USD, GBP
    - EUR, GBP
    - GBP
    - EUR

    INCORRECT choices:
    - EUR, GBP, CHF (either GBP or CHF can be selected)
    - GBP, CHF



    How can such data validation be achieved? Table level? Form's event?

    Thank you for hints.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well there is more than 1 way to approach this....I think I might put them in a table - and the table is the record source for your drop down selector (combo box); in the table I would add this second numeric value:
    EUR 0
    USD 0
    GBP 1
    CHF 1
    that numeric value doesn't have to be seen by the user; but then you can trigger simple math in the AfterUpdate event of the selection control using this second number - and if =2 then you can pop up a message or otherwise stop the person from what they are doing...

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

Similar Threads

  1. Limit number of entries into nested subform?
    By shadowbh2 in forum Programming
    Replies: 7
    Last Post: 11-28-2014, 11:03 PM
  2. Query Results Not Limited to Data Entries
    By cperry88 in forum Queries
    Replies: 3
    Last Post: 01-23-2014, 12:52 PM
  3. Replies: 14
    Last Post: 01-07-2014, 04:20 PM
  4. Replies: 1
    Last Post: 11-26-2013, 01:41 AM
  5. validation setting for duplicate entries
    By noweyout in forum Forms
    Replies: 1
    Last Post: 02-18-2011, 06:14 AM

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