Results 1 to 4 of 4
  1. #1
    Gooford is offline Novice
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    10

    Can I link a table via a field result created by an expression?

    Hi,

    TABLE1
    I have one table which has a GL code field with numbers 1 -99.

    QUERY1


    I have a query which separates a Divisional code into its subsections, from this I have one field called GL code which is created using mid([GL],9,2) to pull out the two digits which represent GL code.

    Example

    Divisional code is Q1333123234 and the expression draws out 32

    I want to create a new query to match this 32 in QUERY1 with 32 [GL] code in Table1 - when I try and link these fields I get:

    'Type mismatch in expression'

    Any help would be great thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Sounds like you are joining a text field to a numerical field. Try wrapping the text field in CInt(), or the appropriate conversion function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Gooford is offline Novice
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    10
    Thanks - great. I thought it would probably be something silly, but I couldnt work it out!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 07-26-2011, 05:18 PM
  2. Replies: 3
    Last Post: 07-12-2010, 01:38 PM
  3. Programming a result field in a table
    By Linda in forum Programming
    Replies: 9
    Last Post: 07-13-2009, 08:07 PM
  4. Replies: 1
    Last Post: 07-12-2009, 05:09 PM
  5. Link ComboBox to field in a table
    By DrDebate in forum Forms
    Replies: 0
    Last Post: 04-27-2007, 08:03 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