Results 1 to 3 of 3
  1. #1
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97

    consecutive alphabet letters in composite ID field


    I have 1 form for recipients and 1 form for donors, linked via ID. Donors have "Donor ID" as primary key : this field is "ID-progressive alphabet letter" (i.e. recipient 415 has donors 415-A, 415-B, 415-C, etc...) How can I autofill the "Donor ID" field with progressive alphabet letters once a new donor record is created for a given recipient ???
    I think I have to use the recordset to find how many records have been associated , but can't figure out why ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    You want to construct a unique ID. This requires VBA. Common topic. Search forum and Google. Here is a start:
    https://www.accessforums.net/showthr...=custom+unique
    Last edited by June7; 02-25-2012 at 12:39 PM.
    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
    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
    Further to june7's comment, you may be trying to hard to put meaning into a code. Why do you need that particular scheme? If it's for human use you could have such a field, but also have an autonumber PK for Access to use. With RDBMS one fact, one field is often the simplest and easiest method.

    In general terms you are dealing with

    Donors and Recipients, which could be a many to many relationship. You may just be missing a junction table - DonorReceiver or any name you choose, that relates a Donor to a Recipient on a certain Date.

    DonorReceiver would have the following fields

    -DonorReceiverId PK (autonumber)
    -DonorId FK (Donor table)*
    -RecipientId FK (recipient table)*
    -DonationDate dateTime*
    - any other fields specific to this Donation

    * NOTE These 3 fields would be used to create a unique index to prevent duplicates.

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

Similar Threads

  1. Replies: 10
    Last Post: 09-11-2011, 11:50 AM
  2. No duplicates on composite field.
    By boundfree in forum Access
    Replies: 15
    Last Post: 09-06-2011, 02:28 PM
  3. How To Avoid Using Three Field Composite Key
    By Lady_Jane in forum Database Design
    Replies: 14
    Last Post: 08-17-2011, 03:40 PM
  4. Cleaning up the alphabet
    By ducecoop in forum Access
    Replies: 4
    Last Post: 10-28-2010, 08:33 AM
  5. Replies: 38
    Last Post: 05-21-2010, 11:56 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