Hello,
Attached to this post, you will find (the relevant part of) my table structure. It's in Dutch, so I will try to explain what the relevant fields are about.
Now, on that subform I want the field "brutomaandloon" (wage) to have BAREMAS.LOON as standardvalue where:
- Indexatie is the most recent
- Baremas.Anciënniteit = WN_Tewerkstellingen.Anciënniteit
- Baremas.Barema = Functies.Barema
One final clarification: the field "brutomaandloon" on the form will control the field that bears the same name in the table WN_TEWERKSTELLINGEN. The wages in WN_TEWERKSTELLINGEN will usually correspond with the wages set in the BAREMAS table, but not always. That is why I have to save wages in two tables, and why brutomaandloon (wage) must be an over-writable standard value in the form.
To further give you an idea of what I want:
I have tried to compose a DLookup function, without success. It was along these lines:
Thanks in advance,
Bart
Attached to this post, you will find (the relevant part of) my table structure. It's in Dutch, so I will try to explain what the relevant fields are about.
- The table BAREMAS contains all the wages we pay. The wage an employee gets depends on three variables: indexatie, barema and anciënniteit. (EDIT: Since I took the attached screenshot, I have modified the baremas table to have a singular autonumber primary key.)
- BAREMAS.INDEXATIE is a datetime field. It indicates when our wages were adapted to price changes. The literal translation would be indexation, but I don't suppose that would ring any bells, as this system is Belgian.
- BAREMA = salary scale. Text field with only 8 possible values, for example B112.
- ANCIËNNITEIT = seniority. Years range from 0 to 25.
- LOON = wage, which is of course a number.
- FUNCTIE = job title
- RIJKSREGISTERNUMMER functions as employee ID, a unique value to identify employees.
Now, on that subform I want the field "brutomaandloon" (wage) to have BAREMAS.LOON as standardvalue where:
- Indexatie is the most recent
- Baremas.Anciënniteit = WN_Tewerkstellingen.Anciënniteit
- Baremas.Barema = Functies.Barema
One final clarification: the field "brutomaandloon" on the form will control the field that bears the same name in the table WN_TEWERKSTELLINGEN. The wages in WN_TEWERKSTELLINGEN will usually correspond with the wages set in the BAREMAS table, but not always. That is why I have to save wages in two tables, and why brutomaandloon (wage) must be an over-writable standard value in the form.
To further give you an idea of what I want:
I have tried to compose a DLookup function, without success. It was along these lines:
Code:
Dlookup("[loon]","baremas",[indexatie] in max([indexatie]) AND [baremas]![anciënniteit]=[wn_tewerkstellingen].[anciënniteit] AND [baremas]![barema]=[functies]![barema])
Bart
Attachments
Last edited: