Results 1 to 4 of 4
  1. #1
    habsfan1986 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2015
    Posts
    2

    Coding for duplicate drawing names

    I am looking for some help with VB code that will produce the following:


    I have 4 criteria to create a drawing number
    2letter (XX)
    1letter (Y)
    DrawingYear (2020)
    Number (06)




    Full drawing number XX-Y-2020-06


    the first three are pull downs and the last is just an inputted number.
    I would like to check that the full drawing number (all 4 criteria) is not a duplicate number and have it tell me right away before finishing the the record.

    Thanks for the help and suggestions

  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,870
    Why concoct a number/identifier?
    I recommend the old stand by--- one fact, one field.
    What do the letters represent? Why?

    Whats wrong with: (explicit facts that you want to record/use)
    DrawingID
    DrawingNumber
    DrawnBy
    DrawingCreateDate
    DrawingVersionNumber

  3. #3
    habsfan1986 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2015
    Posts
    2
    Quote Originally Posted by orange View Post
    Why concoct a number/identifier?
    I recommend the old stand by--- one fact, one field.
    What do the letters represent? Why?

    Whats wrong with: (explicit facts that you want to record/use)
    DrawingID
    DrawingNumber
    DrawnBy
    DrawingCreateDate
    DrawingVersionNumber
    First 2 letter designation - facility abbreviation
    Second 1 letter designation - group wanting work done - Electricians, Engineeering, etc.

    This is the way the manager wants it to be set up so that's what I did.

  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,870
    Research DCount(), then a calculation before accepting your code usingg if Dcount(your setup) =0 then no duplicate exists.

    However, your manager does not appear to be familiar with relational design concepts. Can you do it as he says, sure.
    But do yourself a favor read up on Normalization, the KISS principle and design concepts.
    Here's a M$oft link
    Don's paper on relational design

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

Similar Threads

  1. Replies: 6
    Last Post: 01-08-2018, 12:39 PM
  2. Inputting Yes or No for Duplicate Names HELP!!
    By Crawfordrider33 in forum Access
    Replies: 4
    Last Post: 05-07-2015, 09:11 AM
  3. Duplicate Coding HELP!
    By RachelBedi in forum Forms
    Replies: 2
    Last Post: 07-18-2012, 10:16 AM
  4. check for duplicate First and Last names?
    By newtoAccess in forum Access
    Replies: 3
    Last Post: 03-19-2011, 04:05 PM
  5. Customer Entry/Find Duplicate/Similar names
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-27-2010, 09:20 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