Help with Query

GreyhoundFan

New Member
Joined
Nov 5, 2010
Messages
7
What I want to do with my data is a little beyond my knowledge base so I'm hoping someone can help me.

I want to do an analysis on an existing database of data which will tell me the sequence of products ordered for the whole database. The database order section is set up with the following fields (there are other fields just listing the relevant ones):

OrderID (Auto Number) - Primary Key
OrderDate (Date/Time)
ProdID (Number) - Linked to another db called Product
CustID (Number) - Linked to another db called Cust

What's the quickest way to figure out the product sequencing across all of the 250k+ orders? Thoughts, suggestions?

Thanks for your help,
JB

<input id="gwProxy" type="hidden"><!--Session data--><input *******="if(typeof(jsCall)=='function'){jsCall();}else{setTimeout('jsCall()',500);}" id="jsProxy" type="hidden">
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
The tables are related to each other like this...

Order Table
OrderID (Primary Key)
OrderDate (not linked)
ProdID (linked to Product Table; Order Table = many, Product Table = 1)
CustID (linked to Cust Table: Order Table = many, CustID Table = 1)

Thanks,
JB

<input id="gwProxy" type="hidden"><!--Session data--><input *******="if(typeof(jsCall)=='function'){jsCall();}else{setTimeout('jsCall()',500);}" id="jsProxy" type="hidden">
 
Upvote 0
Build a query and add the three tables (Order, Prod, Cust) to the layout. The joins should be there if you have defined them in the Relationships view.

Add OrderID, OrderDate, ProductDescription, CustomerName to the grid. (adjust to suit real names)

By default, Access will sort by OrderID. If you would rather sort by OrderDate, double-click the Sort row under OrderDate so you see Ascending.

Run the query and see if that does the job.

Denis
 
Upvote 0
Thanks Denis for your advice! I greatly appreciate it.

I'll try it soon. I've actually figured out a way to get the info I need by using Excel. I'm sure it's the long way yet it works for what I need right now. :)

Thanks again! Have a great day today,
JB
<input id="gwProxy" type="hidden"><!--Session data--><input *******="if(typeof(jsCall)=='function'){jsCall();}else{setTimeout('jsCall()',500);}" id="jsProxy" type="hidden">
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,484
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top