Results 1 to 4 of 4
  1. #1
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142

    separating multiple entries in field into separate fields

    In excel it is possible to enter information into a cell separated by commas and then have another column break it down into multiple cells in the column. In other words if this is in a cell [cm,ok,lp,ij] excel separates the information and creates the following.
    [cm]
    [ok]
    [lp]
    [ij]



    In access is this possible? Enter all the information in one field and then have access separate it with a query or something or would I have to create a separate field for each entry? I did it like this in excel to save space as I have 15 possible codes to enter so that would be one field or 15. any Guidance on this would be appreciated.

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If they are separate records, then they should be stored as such.
    I'm not sure of your terminology, a field in access stores a (single) piece of data, each piece of data is a record.

    There are such things in Access as Multivalued fields, but anyone with any experience avoids them like the plague, as they are very difficult to work with.

    If you wanted to enter data in the format of value1, value2, value3 - you could build a simple function to take that from a form and insert appropriate individual records, but it makes validating the data a lot harder, and isn't something you will see done very often.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    Is there a tutorial on how to build the function to separate the values entered on a form and place them in an individual record?

    I am entering data from an associates day as he works in a warehouse. during that day he my be asked to perform one task or many. We separate the task by task codes to save time and space. So If he unloads a truck, then puts away the product, then is asked to pick an order we enter it in as the three codes in one cell. uww.at,and AR instead of having three separate columns. I am just worried that in the end my table will be extremely long with 40 or more fields and the entry form would look a mess.

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Your data should be stored vertically - a field shouldn't be called a data type (No fields called UWW or AT etc) so your data should be stores along the lines of,

    EventID, EmpID, EventDate, EventType

    You would have a table for your event types and store the short code and a probably a fuller description.

    By doing this if you add an event type you simply add it to your EventTypes table and then use it in your existing Events table. No need to change anything to accommodate the added process.
    This is a fundamental of database design - Normalisation of your data. It's key to making your design useable and manageable going forwards.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 10
    Last Post: 12-08-2017, 04:42 PM
  2. Separating fields
    By markbitman in forum Queries
    Replies: 2
    Last Post: 07-31-2014, 09:05 AM
  3. Separating data into 2-fields?
    By djclntn in forum Queries
    Replies: 2
    Last Post: 11-01-2012, 10:04 AM
  4. multiple fields in separate records
    By Fredo0709 in forum Database Design
    Replies: 9
    Last Post: 04-09-2010, 12:23 PM
  5. Splitting a field to separate fields
    By Petefured in forum Programming
    Replies: 8
    Last Post: 06-08-2009, 04:11 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