Results 1 to 2 of 2
  1. #1
    daltonmillion is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2015
    Posts
    3

    sorting a linked tables columns

    Through work I have a system that outputs data into an excel sheet. In one column it has:

    "Handling Unit"
    Which is a number assigned to a bin of parts
    (ex. 82118897)
    &
    "Material"
    Which is a number assigned to the material that resides in each handling unit.
    (ex. 073945994-0000)

    Both of these numbers ranges vary a lot but the consistent aspects of them are


    1.) the 0 that exists in front of the Material number and not on the Handling Unit number
    2.) the formatting of the Material number (hyphen followed by zeros)

    I want to write a macro,query,etc. that takes this linked data and separates this column into 2 columns labeled "Handling Unit" and "Material". I am completely unaware of how to do this. Any help would be greatly appreciated! Thank you 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
    53,632
    Do you want to retain leading 0?

    Use string manipulation functions to construct fields with expressions in query.

    If same number of digits before and after hyphen:

    Left([Material], 9)

    Right([Material], 4)

    If the number of digits varies, gets complicated.
    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. Replies: 4
    Last Post: 11-22-2013, 11:20 AM
  2. Replies: 5
    Last Post: 02-02-2012, 06:42 PM
  3. Replies: 2
    Last Post: 08-22-2010, 07:59 PM
  4. Linked table from outlook missing columns
    By nehamd4 in forum Access
    Replies: 0
    Last Post: 07-21-2010, 12:58 PM
  5. Sorting date columns in query
    By madcreek in forum Queries
    Replies: 3
    Last Post: 06-02-2010, 07:45 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