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

    Update new Multivalue checkbox field with existing data from other fields

    I have a database table called "Client" with these relevant fields:

    Client.ClientID
    Client.Crime2
    Client.Crime3
    Client.Crime4
    Client.Crime5
    Client.Crime6
    Client.AdditionalVictimizations

    The Crime2-6 fields are Lookup ComboBox fields querying the "ListCrimes" table with these fields:



    ListCrimes.Detail
    ListCrimes.CrimeID
    ListCrimes.Abbr [the field that displays in the Crime2-6 and AdditionalVictimization fields in the Client table]

    The "AdditionalVictimizations" field is a "multivalue checkbox" field that also gets its data from ListCrimes.Detail using a Lookup ComboBox query. The AdditionalVictimizations field is currently without data. It was added to simplify new data entry where a staff person can enter multiple values from one field instead of five.

    Going forward is easy, but I want to update or append the existing data in the Crime2-6 fields into the AdditionalVictimizations multivalue field, and then delete the Crime2-6 fields. Can anyone help me with the append or update query? I don't know SQL, but can copy and paste just fine if SQL is the only way to do it!

    Thanks in advance....

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    I NEVER use multi-value fields. They are a headache to deal with. Review https://support.office.com/en-us/art...624E1E323A#bm7

    Simplest approach is to build a related table and populate Crime fields as records into that table. This is essentially what a multi-value field is - only Access hides the dependent table.

    A UNION query can rearrange the Crime fields into a normalized structure and then use that query as source for INSERT action.
    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
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by ama View Post
    I have a database table called "Client" with these relevant fields:

    Client.ClientID
    Client.Crime2
    Client.Crime3
    Client.Crime4
    Client.Crime5
    Client.Crime6
    Client.AdditionalVictimizations

    The Crime2-6 fields are Lookup ComboBox fields querying the "ListCrimes" table with these fields:

    ListCrimes.Detail
    ListCrimes.CrimeID
    ListCrimes.Abbr [the field that displays in the Crime2-6 and AdditionalVictimization fields in the Client table]

    The "AdditionalVictimizations" field is a "multivalue checkbox" field that also gets its data from ListCrimes.Detail using a Lookup ComboBox query. The AdditionalVictimizations field is currently without data. It was added to simplify new data entry where a staff person can enter multiple values from one field instead of five.

    Going forward is easy, but I want to update or append the existing data in the Crime2-6 fields into the AdditionalVictimizations multivalue field, and then delete the Crime2-6 fields. Can anyone help me with the append or update query? I don't know SQL, but can copy and paste just fine if SQL is the only way to do it!

    Thanks in advance....
    I agree with June7. I also I NEVER use multi-value fields. They were added to help with Web App hosted in Sharepoint.


    Also in your design you have repeating field:

    Code:
    Client.Crime2
    Client.Crime3
    Client.Crime4
    Client.Crime5
    Client.Crime6
    These really should all be in a sub/child table with one record per crime.

    The is also true for the Client.AdditionalVictimizations as June7 has previously pointed out.

    Making the leap from a spreadsheet design (single table) to a relational database (multiple related tables) is a huge leap. In the long run it is really worth it. By harnessing the power of a relational design you will be able to add Client.Crime7, Client.Crime8, not by having to edit the table and add fields and update many queries, forms and reports, but simply add additional records. No need to make any design changes.

  4. #4
    ama is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    2
    Thanks for the comments from both forum members. I've decided to abandon the idea of the multivalue checkbox. In looking more deeply at the database I inherited, I have noticed many fields that would be better organized into linked tables and have started the process.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-13-2014, 08:02 PM
  2. Replies: 29
    Last Post: 04-25-2014, 03:49 PM
  3. Replies: 3
    Last Post: 07-30-2013, 12:11 PM
  4. Replies: 2
    Last Post: 10-22-2012, 05:32 PM
  5. Replies: 1
    Last Post: 08-04-2008, 03:30 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