Results 1 to 4 of 4
  1. #1
    cadsvc is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    19

    Help - Need to split() info from scanned barcode

    Situation:

    I have a db that has a link to a table in another db.
    This link gives me a workorder number and a part name I need.


    The scheduling department prints their workorder.
    On the workorder is a barcode that I can scan to make my system execute without typing the workorder number.

    The barcode format printed is approx 10 characters and “-010”; a sequence number.
    In one of my queries I can scan the barcode with a scanner using [text to tell operator to scan the barcode].

    The workorder number, in the linked to table, is in a field labeled DNJOB.


    Data in the DNJOB field does not have “-010” extension.

    EXAMPLE: I scan “1234 -010” but the data in the linked table only “1234 “

    Problems:

    1. What do I need in my query to split / chop / trim …. off the -010 so I can query on [DNJOB} and retrieve the part name?
    2. I can copy and paste code but need to be instructed where to paste the code if not in a query.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    I don't think you can do this in the query by linking the tables and trimming because the actual data that the table links on will still have the -010. Unless you either chop it off permanently or add it to the other field you will have to do this with code.

    Try this:

    Create a query and add the 2 tables but do not link them. Add the 2 fields then in a seperate field put something like this:

    MatchFields: IIf(Left([LinkedField],InStr([LinkedField],"-")-1)=[DNJOB],0,-1)

    In the criteria for this field put 0.

    NOTE: you should replace [linkedField] with the fieldname in your linked table.

  3. #3
    cadsvc is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    19
    This problem is solved.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Would you care to share your solution with others that read these forums and then follow the link in my sig and mark this thread as Solved?

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

Similar Threads

  1. Split Database
    By pthoopth in forum Database Design
    Replies: 3
    Last Post: 11-09-2009, 03:37 PM
  2. Barcode Scan input
    By Nem3s1S in forum Database Design
    Replies: 4
    Last Post: 09-26-2009, 09:43 AM
  3. Split Forms
    By bmclachlan in forum Forms
    Replies: 1
    Last Post: 08-17-2009, 02:32 AM
  4. barcode
    By techker in forum Access
    Replies: 1
    Last Post: 02-21-2009, 09:04 PM
  5. Replies: 1
    Last Post: 12-30-2008, 08:58 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