Results 1 to 7 of 7
  1. #1
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528

    Opt-in data entry

    Hello Guys
    I have a question!
    Field in a table where four fixed values ​​(A / B / C / D)
    Can I make my product, for example, (a) when the number of records to 75 record for this category


    Shows me a warning or message or not to include the possibility of class (A) in the fields
    In other words, each class has the upper limit is 75 and so on

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    You can run a query or a DCount with criteria and check the quantity at any time.

  3. #3
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Thank you very much
    orange
    Is it possible to explain the expression or function

    For example, the domain name (AS) in the table
    Class name is (A / B / C / D)
    Thanks for helping me

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Let's get the problem defined so readers understand it.

    Your post dealt with:
    field
    table
    product category and
    class

    My interpretation was if a field in my table is A ( similarly B|C|D)
    can I determine or ensure I don't ever have more than 75 of these records.

    But you response is no clearer to me. In fact now you have added domain.

    Give an example if you can not describe your requirement clearly.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by orange View Post
    In fact now you have added domain.
    Just an FYI. Domain appears in intelisense when using Dcount() and other Domain Functions. It is asking for a table or query object.

  6. #6
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Thank you
    I'll explain it
    For example we have a school where the number of classes for students
    Each row accommodates 75 students
    I want to be when the number of students in the classroom (a) 75 is to stop accepting student extra
    The sense to stop the introduction of a new record

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Dcount will count the number of records. You can choose a field name to apply criteria. Maybe you have a Yes/No field that will indicate whether or not you want to include it in the count.

    The following would count the number of records where the yes no field = True. It is counting the Primary Key field where YesNo = -1 in the given table name (Domain).

    dim intCount as integer
    intCount = DCount("[PrimaryKeyField]", "TableName", "[MyYesNoField] = -1")

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

Similar Threads

  1. Replies: 7
    Last Post: 02-08-2014, 12:31 PM
  2. how to copy last entry data for new entry
    By alexandervj in forum Access
    Replies: 7
    Last Post: 11-13-2013, 02:57 PM
  3. Replies: 5
    Last Post: 08-12-2013, 12:53 AM
  4. Replies: 0
    Last Post: 02-15-2013, 07:55 AM
  5. Normalized data structure denormalized for data entry.
    By elsuwi in forum Database Design
    Replies: 3
    Last Post: 06-09-2012, 09:53 PM

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