Jump to content

This topic is 6389 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Basically I have a DB of rooms. Each record has 1) name 2) area 3) generic type of room (eg large, small).

I want to be able change the area so all similar generic types change. Hence I have a self relationship by generic type. This seems to work until I try to add the areas up as the relationship refers only to the first record.

Is there some way around this? thanks

Edited by Guest
Posted

thanks

each room is assigned a type

eg

room 1-------small room

room 2-------small room

room 3-------medium room

room 4-------large room

room 5-------large room

Posted

So the Rooms table needs a TypeID field.

A Type table contains the records with 1 = small room etc where 1 = TypeID.

Match the TypeID field together to relate the twp tables.

Posted

Thanks Vaughan. The relationship is working fine, just the areas wouldnt sum up. eg if I had two typeID records representing large and small rooms the sum would be only of those two records when (in case of my earlier example) should be summing 5 instances.

It may not be the best solution but I have created a count field (for the number of rooms in each type) and multiplied it by the area to get a field I can sum.

I was hoping for an simpler solution as ultimately the database will have a lot of different fields that need summing.

This topic is 6389 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.