Access query to identify next occurrence

it's an excel world

Board Regular
Joined
Sep 17, 2008
Messages
126
Hello all,

I am struggling to understand the approach I need to take in order to accomplish the following. I have a Orders table and a Transactions table. I am trying to identify the value in the TransactionID field on the Transactions table where the value in the Partnumber field on the Orders table and Partnumber field on the Transactions table are equal AND the Date/time field on the Transactions table is greater than the date/time field on Orders table. However, there can be many instances of a greater date/time stamp, and I am only interested in the first occurrence.

In Excel I would use the Index Match functionality to accomplish this but having a very difficult time understanding Access. A co-worker mentioned possibly running a subquery to first identify the records with like partnumbers, then an additional query to identify the first occurrence.

Any assistance would be greatly appreciated!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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