A Step To The Left

With One Level Higher, what you see is not necessarily what youve got

Look. A form with twenty-six buttons, each lovingly laid out and labeled with a letter of the alphabet. Twenty-six times, each buttons action or OML has been opened and adapted so that the subform can be filtered to reflect the letter on the button.

Well actually no. Who wants to work that hard! How do you think this was created?

There is but one button. Its sat on a subform, set to show twenty-six times.

This is one practical example of the one level higher concept at work. Let me show you how it works.

First, heres the structure of the document. I start with Looper, and hang from it two sets of subforms.

The first is to Customer, and is related to Looper, matching its indexed field LastName to Loopers vMatch. So if vMatch contains S*, well see all the Customer records with a last name starting with S, as in the screen shot.

The second is to Looper. You can simply consider this table as a set of ordinal numbers that is, numbers in order. So I can manipulate Looper values into anything that has some kind of order, which can include the xth value in a string. And if that string happens to be the letters of the alphabet well, heres a form-only virtual called vInit, text 1, derived:

midc ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" , LooperNo , 1 )

Whatever is the LooperNo for this subform record becomes the location of the corresponding letter in that string.

What kind of relationship should be used between Looper and itself? Well, you are used, I hope, to describing relationships in terms of their cardinality: 1:1, 1:M, M:N. Heres a cheeky variation on the many-to-many, which we could call the all-to-all: if you have no match fields in the relationship, every record in one table will match ALL the records in the other!

That is what I have here: a link between Looper and itself, matching on nothing, which retrieves everything.

I only want the first twenty-six. So I simply display the subform two rows by thirteen columns, and remove the scrollbar.

>> Page 2