Results 1 to 4 of 4
  1. #1
    renegp55 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    4

    Unhappy Running a query from a table that is using a field with a lookup wizard...

    I am trying to run a query based on a table where I used the lookup wizard to get data from another table. I want to ceate a query using text, e.g. [Enter CrsCode:] CU0DIV. Seems I can not run the query because I am using text and the lookup field is using the number ID in the lookup table...any ideas on how to fix this...

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    What do you mean by 'create a query using text'?

    Show the query SQL statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    renegp55 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    4
    [QUOTE=June7;162758]What do you mean by 'create a query using text'?

    In the query view in the criteria box I entered : [Enter CrsCode:] and then run the query. When it asks for a CrsCode I entered one of my course codes for ex. CU0DIV and then run the query. Get error msg, I think problem is I used the Lookup wizard when creating the table I am using to run the query on. Found out later that this was a no-no but, kind of late now. I think the query is trying to run but is looking for a num value instead of text I typed..
    D

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,913
    Yes, if the field is a lookup then the actual value of the field is the number ID, not the alias text descriptor.

    I never use query parameter input prompts. Can't validate the input and as you have discovered, no good with lookups. Use a form for users to input/select criteria.

    Review:

    http://datapigtechnologies.com/flash...tomfilter.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. lookup wizard
    By dafdek in forum Access
    Replies: 1
    Last Post: 01-10-2013, 04:57 PM
  2. lookup wizard
    By bigmac in forum Access
    Replies: 1
    Last Post: 03-10-2012, 02:09 PM
  3. Query to lookup relative field from table selection
    By shabbaranks in forum Queries
    Replies: 5
    Last Post: 12-20-2011, 11:12 AM
  4. Lookup wizard
    By VLI in forum Forms
    Replies: 7
    Last Post: 01-28-2011, 09:25 AM
  5. Using tbale field in Lookup Wizard
    By dotancohen in forum Database Design
    Replies: 5
    Last Post: 12-10-2009, 02:54 AM

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