Multi-Record queries

D

Derek Wittman

Good morning
I work in the grocery distribution business and I'm migrating from using Excel to Access for some calculations. My tables contains

LOAD Numbe
STOP Numbe
Dept/Aisl
Slot Numbe
Piece

And has data that looks like this

010
6
R
1234


010
6
R
1235


Sometimes the slotting is done horizontally (left to right or right to left) within a bay (slots - above are <bay><bay><bay><slot><slot

51 52 53 54 5
41 42 43 44 4
31 32 33 34 3
21 22 23 24 2
11 12 13 14 1

Sometimes it's vertically (bottom to top

15 25 35 45 5
14 24 34 44 5
13 23 33 43 5
12 22 32 42 5
11 21 31 41 5

When it's horizontal, I need to get the percent chance of 'backtracking' within the same bay. Using the Horizontal bay (above), it would be like the selection path zig zags within the bay. 11, 13, 15, (backtrack) to 22, 25, (backtrack) to 33, (backtrack) to 41..

Obviously, this requires quite a bit of sorting (load, stop, dept, and slot - all ascending). I need to "ding" the record if the bay # is the same (123) and the 5th digit is less than the previos record's 5th digit

1231
12351 (involves a backtrack step)

I realize that tables generally do not rely on a record order (PEOPLE on it, but the DATABASE doesn't care), but in this case, are there any formulae, etc that I could use to evaluate differences between a current and previous record

Thank you very much in advance! I really appreciate it

Derek
 

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