Results 1 to 7 of 7
  1. #1
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Unexpected datatype

    Good day all,

    I have a field in my report which displays data in as data type number e.g. 240 , however I am expecting data type string e.g. "George Renee".

    This field's data source is a field in a table which attains its data from another table using the Lookup Wizard. The original data is string type, so I am wondering why the data in the report is number.

    Can anyone explain this surprise?



    Thank you.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    Most developers will advise you to NOT use Lookups at the table field level.
    This is why you shouldn't use them.

    It is a "feature" added by M$oft, and only applies to Access.

    Use traditional table lookups (search Lookup tables or reference tables).

  3. #3
    accedeholdings is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Sep 2014
    Location
    Hackney, South Australia
    Posts
    17
    If we can't use Lookups, then what is the next best option to get the same result?

  4. #4
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thanks for the advise, but what do I do now that I have used this way extensively?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    see this for ideas.

    The big issue with lookup fields is that you typically select field1, the ID field. Then when you want to display a field, typically a name, all you have is the id. So you have to create a query, with the fields you might display, that includes the original table and (joined) to the table that holds the "linked" field.
    Easy enough to do, but something you thought Access was doing for you...
    Last edited by orange; 03-23-2015 at 03:01 PM.

  6. #6
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thanks anyway

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

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

Similar Threads

  1. Unexpected results on Inner Join
    By Access_Novice in forum Access
    Replies: 2
    Last Post: 09-05-2014, 12:50 AM
  2. Unexpected results with DAO recordset
    By GraeagleBill in forum Programming
    Replies: 1
    Last Post: 10-07-2012, 07:37 PM
  3. Replies: 3
    Last Post: 12-26-2011, 10:45 AM
  4. Unexpected Results from Curdir?
    By bginhb in forum Programming
    Replies: 6
    Last Post: 08-17-2011, 03:58 PM
  5. Binary datatype
    By huBelial in forum Access
    Replies: 1
    Last Post: 04-04-2011, 02:02 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