Results 1 to 5 of 5
  1. #1
    slickdog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2015
    Location
    Indonesia
    Posts
    3

    Inconsistent results with a simle query

    Hi
    I am running MSaccess 2007


    I am using a query from a from button to list, in the query, just the current form data. I wan to use this further in a report which I was able to do. To troubleshoot I disabled the button from picking the report and just selecting the query.


    In the query I am using [Forms]![Call Log]![Call Data ID] for the criteria under Field 'Call Data ID' and Table 'Call Log', no sort and show =Yes.
    where 'Call Data ID' is the primary key in 'Call log'


    I only have 15 records in 'Call log' at the moment.




    when I run the query With Call Data ID parameter between 1 and 8 the query runs OK however when I use a higher number i.e. for records 9 through to 15 teh query returns nothing.


    I do not understand this at all. the primary key 'Call Data ID' is from an auto number for each new record so the data type seems ok.
    Just like to say this is my first real look at Database set up.

    I want eventuall show a simple report fro a record as I log it in then email that report to a client as this is a call recording database fro a Answering service.
    I was able to have it all work ok opening the report then using the email button in the main access program. but found that after record 8 no data was picked up.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Have you tried adding criteria to a simple SELECT query? If you add your ID column to a select query and then type the following in the Criteria row, your query should retrieve specific records.
    Code:
    Between 1 And 9

  3. #3
    slickdog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2015
    Location
    Indonesia
    Posts
    3
    Sorry but that's no what I want, I think I must have written my question badly.

    It is returning info 1 through to 8. If I am record 1 or 2 up to 8 it shows the data, but at 9 or after the query returns nothing it should return a single record in the query no matter what record I'm at.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    You can test your query by changing the criteria. I suggest you do this before incorporating other factors like forms. In one test of a simple query object you can use Between 1 And 9. In another test of your query object you can use Between 10 And 20. Afterwards, you can add other factors like including a form object in your query's criteria.

  5. #5
    slickdog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2015
    Location
    Indonesia
    Posts
    3

    Red face Fixed

    Quote Originally Posted by slickdog View Post
    Sorry but that's no what I want, I think I must have written my question badly.

    It is returning info 1 through to 8. If I am record 1 or 2 up to 8 it shows the data, but at 9 or after the query returns nothing it should return a single record in the query no matter what record I'm at.
    I have it fixed now.
    I believe there were two things wrong.


    1. I used Employee ID twice once for the person who takes calls (Operator) and once for the person who Send the call data on to the Client. we had not logged the sending of the data on on two occasions. .
    2. Then as I was in the data I checked For occasions where the operator and the sender were different and the first was at record No 9 of which I could not see passed when running the query.

    I then added another Employees table into the query - "Employees_1" un-linked "Sent by" and Employee ID from "Employees" in the Query and linked "Sent By" to Employee ID in "Employees_1". it all now works.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-30-2015, 03:59 AM
  2. Inconsistent results.. please help!
    By vikghai in forum Access
    Replies: 6
    Last Post: 02-09-2014, 05:37 PM
  3. Replies: 1
    Last Post: 09-01-2012, 06:58 AM
  4. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  5. Inconsistent Query Error...
    By DHavokD in forum Queries
    Replies: 8
    Last Post: 06-11-2009, 09:58 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