Query not returning the correct results

C

Caleb

Hello, I'm designing a query that pulls from a product orders table called
'Fresh Inport From 1ShoppingCart'. My query needs to return all "*Accepted*"
orders from the 'ApproveStatus' field that have an 'OrderId' thats below
1000000000. This much is done correctly. Now heres my problem. They query
must also create two new fields: 'Purchased' and 'NextPurchase' these fields
should look at the 'SKU' field in the 'Fresh Import From 1ShoppingCart' table
and compare it to the 'SKU' field in another table called 'Product SKU'. If
the 'SKU' matches up to a particular record then I want the entrys under
'Purchased' and 'NextPurchase' in the 'Product SKU' table to be entered in
the 'Purchased' and 'NextPurchase' records under the same name. I almost got
it to work by adding the 'Purchased' and "NextPurchase' fields to the
'Product SKU' table. I then wrote this expression in the criteria [Product
SKU]![sku]=[Fresh Import from 1ShoppingCart]![SKU] However after running and
closing the query and then return to to the design mod, a new field was
created and the Criteria for 'Purchased' and 'NextPurchase' was changed and
moved. Now the new field name is '[Fresh Import From 1ShoppingCart]![SKU]'
and the Criteria for it is '[Product SKU]![sku] And [Product SKU]![sku]'. Now
before I started messing with the SKUs in the query, the cotterct number of
orders were returned corretctly. Now I'm abiut 31 orders off after runnign
the new query and I cant figre it out. The only thing that I could think
would be doing is this would have to be that strange Query. If its posslibe
I'd also like the 'Purchase' and 'NextPurchase' fields to be created with the
query so I dont have ti make them every time I have to upload a new 'Product
SKU' list

Thanks
Thanks in advance. Any questions? plz ask ill be happy to reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top