Results 1 to 5 of 5
  1. #1
    psoli is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    4

    Simple Query not returning any data.

    Hi all,



    Rusty as anything with Access, it had been about 6 years since I touched it, and then it was 2000.

    I'm creating a database of stock which needs to be cross referenced against technical information sheets - however I've become stuck on the first Q, let alone the five or so others I need to write. I have a form, which calls this Q to pull information from a database, however even when using the wildcard and entering information that would definately return results, it doesn't return anything. Without the Form, it works :/

    This is the SQL

    Code:
    SELECT mintexstock.[Product Code], mintexstock.Min, mintexstock.Max, mintexstock.Stock, mintexstock.POQty, mintexstock.Cost, mintexstock.Qtr, mintexstock.YtD, mintexstock.[2010]
    FROM mintexstock
    WHERE (((mintexstock.[Product Code]) Like [Forms]![Stock Search]![product]) AND ((mintexstock.Min)>[Forms]![Stock Search]![minstock]) AND ((mintexstock.Max)<[Forms]![Stock Search]![maxstock]) AND ((mintexstock.Stock)>[Forms]![Stock Search]![instock]));
    Any pointers would be a massive help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This is a saved query object that is referenced in the form's RecordSource? Are controls bound to fields of the RecordSource?
    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
    psoli is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    4
    Quote Originally Posted by June7 View Post
    This is a saved query object that is referenced in the form's RecordSource? Are controls bound to fields of the RecordSource?
    The query is referenced in the form's RecordSource - the controls being?

  4. #4
    psoli is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    4
    Cheers June7 - I just found out that I don't actually need to run that query anymore because our other database can sift that information out for me.

    Regards

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Glad you have a solution.

    BTW, controls are the things placed on forms and reports - labels, textboxes, comboboxes, listboxes, subform containers, etc.
    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. Query - Returning ID instead of Value...??
    By Poolio in forum Queries
    Replies: 5
    Last Post: 04-18-2011, 07:10 AM
  2. Returning inverse of a query
    By caddcop in forum Queries
    Replies: 5
    Last Post: 02-16-2011, 04:48 PM
  3. Union query only returning 255 characters
    By jpkeller55 in forum Queries
    Replies: 25
    Last Post: 10-05-2010, 05:51 AM
  4. Query Bug? Not returning consistent results
    By trb5016 in forum Queries
    Replies: 4
    Last Post: 06-15-2010, 12:00 PM
  5. Query not returning all of the results
    By velvettiger in forum Queries
    Replies: 4
    Last Post: 03-11-2010, 06:56 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