Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query is returning wrong data

Status
Not open for further replies.

stc

Technical User
Aug 23, 2001
25
GB
Hi,

My database contains a table called Account Grade, which records, amongst other things, the Last Contact and Next Contact dates for various customers. In order to see which customers need to be contacted between a given set of dates, I run a query which returns any record from the Account Grade table where the Next Contact date is equal to or lies between the dates entered by the user. This has been working fine for a while now. However, there are two records which are being flagged by the query, even though their Next Contact dates are outwith the range being specified by the user. The Next Contact date is entered by the user on a form, and is stored on the Account Grade table. I have looked at these for both records and they are shown as a date in October. However, when I run the query, both records are returned with a Next Contact date in July. I have double-checked the record on the Account Grade table, and it is correct; in fact, the Next Contact date the query is returning is not in the record anywhere (I thought maybe the query was pointing to the wrong field). Can anyone shed any light on this? All the other records are fine, so I suppose the problem might be with the records. Sorry to have been so long-winded, but this is driving me nuts!

Thanks...
 
Cancel the above! I sorted it out - there was a "rogue" record for both of the troublesome records, with different contact details. No brainer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top