Results 1 to 3 of 3
  1. #1
    PinkDuster's Avatar
    PinkDuster is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Aug 2017
    Location
    Cleveland area
    Posts
    65

    Pretty Sure the Lookup Table is the Problem - Can't See Text, Just See Numbers

    I have a report to view items sold in date order, grouped by month and also by transaction type. Used a lookup function in the Orders table to describe transaction type (before I learned this wasn't necessarily a good idea). My report shows the numerical ID for the transaction type, and I want it to show the text.

    Click image for larger version. 

Name:	NumbersInsteadOfNames.PNG 
Views:	7 
Size:	13.4 KB 
ID:	32201

    Tried using DLookup for the Control Source in the text box for TxnType (as shown below) and got the following result, in which ALL the different transaction types are now call the same thing.
    Click image for larger version. 

Name:	DLookUpExpression.PNG 
Views:	7 
Size:	18.5 KB 
ID:	32202Click image for larger version. 

Name:	WithDLookUp.PNG 
Views:	7 
Size:	13.4 KB 
ID:	32203

    Took a different approach and re-created the query to include the Lookup table, but get similar results.
    Click image for larger version. 

Name:	NewQuery.PNG 
Views:	7 
Size:	35.5 KB 
ID:	32204
    But the query now duplicates each order, showing each of them with each of the different transaction types.

    Is there any correction, or should I redo the table structure to get rid of using a lookup table?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    dont use Dlookup in reports or queries. The query IS the Dlookup by joining the data table to the lookup table.

    ie: join the tClient.State to tStates.ST to get tStates.StateName

  3. #3
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Yup. Get Rid. Recreate your own to do the job properly.

    There is nothing wrong with lookup tables you create and use normally, just M$'s implementation of it that leaves a lot to go wrong / confuse the natives.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 4
    Last Post: 10-13-2017, 06:03 PM
  2. Replies: 3
    Last Post: 09-30-2016, 01:43 PM
  3. Replies: 3
    Last Post: 06-04-2015, 08:17 AM
  4. Replies: 4
    Last Post: 02-12-2012, 02:58 PM
  5. Replies: 9
    Last Post: 11-23-2009, 09:20 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