dbase - master/detail more than one keyfield

Master detail with compound key using dbase files.

This is simple in paradox, but need to do it in dbase.

Basically, have two dbase tables:

table A : CODE/REF/ORDERDATE/CUSTNO  (master table - Each line is unique)

table B : CODE/REF/PRODNO/QTY/COST   (detail table - Mulitple line)

Some data:

I want to map a relationship code/ref fields, this is easy in paradox as we
would have
code and ref keyed in table A, and code,ref,prodno keyed in table B giving
us the relationship we want. And then
map them in the TTable.masterfields.

But in dbase we can only do singular indexes or expression indexes. I have
done a single index MD relationship, but we need
it to be a compound relationship between tableA.code -> tableB.code and
tableA.ref -> tableB.ref.

Obviously we could take out ref and we get a singular index and our MD
relationship, but we have a project that has a 4 compound
key so i want to try with 2 field key before moving upwards.

Any ideas.