Results 1 to 4 of 4
  1. #1
    goalnightx is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Mar 2017
    Posts
    16

    Split Column function

    Hello. I am looking to break out the following data into separate fields either via query update or VBA so that each has it's own column in my database:

    Click image for larger version. 

Name:	PrimaryProfession.JPG 
Views:	17 
Size:	32.5 KB 
ID:	46903
    Looking for results like this (example of first two rows of attached screenshot):

    Primary1 Primary2 Primary3
    actor soundtrack none


    actor soundtrack music_department

    Thank you in advance. It is much appreciated! G

    There would be no more than four new fields and always separated by the comma delimiter

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,283
    Look at the split() function. However split not available in query, so you would need a wrapper function for it in a query.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Probably lots more Google results than this one, which ought to get you going. Just adapt for comma separated values rather than spaces as shown.

    https://probiztechnology.com/blog/20...st-last-names/
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Is that really a comma separated value and not a multi-value field?

    What if you eventually want to associate more than 4 professions? What you want is not a normalized structure. That would call for one field in a related dependent table where each profession would be a record.

    However, it's a balancing act between normalization and ease of data entry/output. What you want might be satisfactory for your situation or it might be a headache.
    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.

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

Similar Threads

  1. Hiding a Column in Split Form
    By cksm4 in forum Programming
    Replies: 2
    Last Post: 04-15-2013, 03:01 PM
  2. Split column
    By willy798 in forum Queries
    Replies: 3
    Last Post: 10-30-2012, 09:09 AM
  3. Split() Function or something like it
    By JRS_ in forum Programming
    Replies: 15
    Last Post: 12-21-2011, 05:44 PM
  4. split column into rows.
    By rsampathy in forum Access
    Replies: 1
    Last Post: 03-03-2011, 12:15 PM
  5. Replies: 15
    Last Post: 01-12-2011, 05:13 PM

Tags for this Thread

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