Results 1 to 5 of 5
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Validating table field value in MS Access

    Dear All,



    I have a table named woPR and field is cCode. I have alraeady entered cCode in table.
    I want to validate the value while entering the cCode in entry FORM so that no other values entered in the form except.
    OR appear all the cCode and then i select .

    Thanks..

    Please assist me.
    aligahk06

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    I'm not sure that I understand your requirement but if you want to prevent users from making a duplicate entry in the field called "cCode" then just set the field's Index property to:
    Yes (No Duplicates)
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    validate the value while entering the cCode in entry FORM so that no other values entered in the form except
    Reads like "I've entered the values in a table and I only want the user to be able to use those values". A form combo with a row source consisting of those values and the Limit To List property set to yes might be another method.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    Apr 2017
    Posts
    1,673
    1. User must not enter anything into table! Hide all tables from users and let them use forms to enter/edit data. This way you have much more control over data in your database (validation, default values, various events which are activated after data entry, etc.).

    2. Don't apply default values to table fields - this may result you having orphan or empty records in table when user tries to abort data entry for some reason. Instead apply default value to form control - so only when the record is saved, the default value is added to according field.

  5. #5
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    What is defaults values to table fields so that no empty records added to table while user abort the data entry form.

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

Similar Threads

  1. Replies: 4
    Last Post: 10-17-2019, 06:19 PM
  2. Validating the table
    By XPeriment in forum Access
    Replies: 5
    Last Post: 08-10-2016, 09:43 AM
  3. Replies: 2
    Last Post: 07-31-2016, 03:50 PM
  4. Replies: 4
    Last Post: 06-21-2016, 11:49 AM
  5. Validating Field Data Across Tables?
    By venomshot in forum Forms
    Replies: 4
    Last Post: 02-04-2010, 05:04 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