Filtering a subform by 2nd column in a combobox (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 05:29
Joined
Feb 19, 2013
Messages
14,740
A joining table won't work, some expenses cannot be split (e.g. a gardening expense for an entire complex)
if there are 10 apartments, divide the total by 10 or some other relevant factor such as floor area
 

REZ

New member
Local time
Today, 05:29
Joined
May 17, 2022
Messages
25
How would I set this up so the user inputting the expense can just put it in once without seeing the joining table?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:29
Joined
Feb 19, 2013
Messages
14,740
I don't know enough about how your business is organised but in principle you would use VBA code to execute an append query. But I would probably set up your property table to be self linking.e .g.

PK....PropertyName..........ParentFK
1......apartmentBlockA.......0
2......appt1..............................1
3......appt2..............................1
4......appt3..............................1
5......apartmentBlockB.......0
6.....appt1..............................5
7......appt4.............................1
8......appt2.............................5

the above represents apartmentBlockA having 4 apartments whilst apartmentBlockB has 2 and can be shown in a query by joining the table to itself on PK to parentFK.

So a charge for the whole block is assigned to PK=1 (or 5), and to individual apartments the relevant PK.

If the property setup is a group of properties that can be bought and sold, the table above would also need fields for bought and sold dates.
 

REZ

New member
Local time
Today, 05:29
Joined
May 17, 2022
Messages
25
That is essentially what I tried to do with a Union query.
Thanks for your help. I'll try do it as a table instead.
 

Users who are viewing this thread

Top Bottom