Results 1 to 4 of 4
  1. #1
    Bosaerohk is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    2

    Expression Builder for Text string manipulation on a lookup table.

    Hi There,



    I am new to Access and I am having an issue with text manipulation that directly involves lookup tables.

    I am able to get the data in my new table from another table using the lookup command for Field1 from one table and then use I a lookup from another table for Field2 to get the other piece of data.

    The new table shows Field1 to be "203-V-2020-CNTR_ON", Field2 to be "_Off_Sw_Stat". When I use an Expression Builder in Field4 that has the following code:

    [Field1] & "_" & [Field2]

    I get 45_13 for a value as a result of the expression. I need the text concatenated together - i obviously have something fundamentally wrong.

    The result I was expecting was the "203-V-2020-CNTR_ON__Off_Sw_Stat". i looked for a concatenate function within access yet I don't readily see one.

    Thanks for your help in advance!
    Denis

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Bosaerohk View Post
    ...I get 45_13 for a value...
    What is a lookup table? are you using LookUp fields while in Design View of your table object? Does the LookUp Field depend on a Value List or a Table?

    In your result, 45_13, 45 is the ordinal position of the first lookup and 13 is the ordinal position of the second.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Lookup FIELDS are different than lookup Tables. Lookup fields hide what is really happening.
    It sounds like "Field4" is grabbing the PK field.

    What is the row source for "Field1"?


    See
    The Ten Commandments of Access
    http://access.mvps.org/access/tencommandments.htm
    "Rule #2"
    then click on the blue "Lookup Fields" at the end of rule#2.

    I never us Lookup FIELDs.

  4. #4
    Bosaerohk is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    2
    Sorry my terminology is incorrect. I was using a lookup field in datasheet view. As I understand it - the lookup field depends on a table as I am referencing the other table to get the information.
    I will look at ordinal of the other table to get the numbers if they correlate.... just need a few minutes as I have a call coming in from a client.

    Thank you.

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

Similar Threads

  1. basic string manipulation
    By trevor40 in forum Programming
    Replies: 2
    Last Post: 01-30-2015, 05:33 AM
  2. Replies: 1
    Last Post: 07-12-2013, 09:17 AM
  3. Replies: 1
    Last Post: 05-09-2013, 07:54 PM
  4. String text manipulation
    By justphilip2003 in forum Access
    Replies: 2
    Last Post: 03-21-2013, 09:56 PM
  5. Text Box Expression Builder with Queries
    By blacksaibot in forum Access
    Replies: 7
    Last Post: 01-10-2012, 10:07 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