Results 1 to 3 of 3
  1. #1
    wlanssens is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    10

    look for digits in text and link them with value of another table

    Hi,

    I have a table where there is information stored about certain workorders.. like location, description, etc.
    The thing is that location is descripted as "03-LZ-.." where the 03 part stands for the departement. I have another table with all the numbers and departements and now I'm looking for a way to link the two. So I have to find a way to look at the first to digits of the "location" in my workorder table and link that number with the table where numbers and departements are stored.

    Does someone have an idea to get this going?



    Thanks!

  2. #2
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    look for digits in text and link them with value of another table

    If it's always in the same place you could make a query. Add a calculated Field to get the department.
    Code:
    Dept: Left(Location,2)
    Now in the form create a listbox, add the fields you need to show then in a double click event.

    Code:
    DoCmd.OpenForm "frmDrpartments",,,"DeptNum=" & lstNAME.Column(#)
    Replace frmDepartments with the name of your Form.
    DeptNum with whatever Field is in your Dept Table and # with whichever column the above is in.

  3. #3
    wlanssens is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    10
    thanks Alex, works great!

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

Similar Threads

  1. Replies: 2
    Last Post: 12-27-2012, 09:37 AM
  2. Replies: 4
    Last Post: 08-10-2011, 02:05 PM
  3. Replies: 7
    Last Post: 06-03-2011, 10:21 PM
  4. Replies: 5
    Last Post: 12-26-2010, 10:56 PM
  5. Text File Link
    By pkell658 in forum Import/Export Data
    Replies: 1
    Last Post: 03-23-2010, 04:46 PM

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