02. marts 2004 - 19:35Der er
11 kommentarer og 1 løsning
Problemer med relationer
Hej Jeg har problemer med relationer imellem 5 tabeller. Jeg skal lave et adressekartotek. Jeg har en persontabel med id, fornavn og efternavn. En tabel med oplysninger om arbejde og en med oplysninger om privat. Derudover har jeg til tabellerne "arbejde" og "privat" relateret to tabeller med postnr., så bynavn automatisk skrives. Når jeg samler alle tabeller i en formular vil den ikke godtage det der skrives. Den skriver, at der mangler en relation i persontabellen.
Denne side indeholder artikler med forskellige perspektiver på Identity & Access Management i private og offentlige organisationer. Artiklerne behandler aktuelle IAM-emner og leveres af producenter, rådgivere og implementeringspartnere.
what do the tables "arbejde" and "privat" contain? If a record is specific for a person then you MUST have a field in these tables which realtes to the person table.
Hej Terry Jeg har allerede relationer fra persontabellen (id, fornavn, efternavn) til tabellerne Arbejde (id, adresse, tlf., mail) og Privat (id, adresse, tlf., mail). Arbejde-tabellen relatere endvidere til en postnr. tabel. Det samme gør Privat-tabellen. Det er dog ikke samme postnr.-tabel der relateres til, da jeg ikke kunne få det til at virke
Hi Janne, I have received your dB and will take a look now. Its normally a good idea to wait in giving points until you get an answer you can us. I may notbe able to find a solution, or someone could give one before me :o)
Your relationships are totally wrong! The primary key in Person table is an autonumber, this is OK. The primary key in PrivatAdresser is also an autonumber. This again is OK, BUT!!!!! you are using the primary key in this table as the relationship to the person table, whcihjsut WILL NOT work.
Make a new field in PrivatAdresser, when you choose the data type for this field you will see one named "lookup wizard" or something like that. Choose the type for the new field and follow the instructions. This will create a "foreign key" to the person table. Take a look at the realtionship from the PrivatAdresser table to postnr-privat, this is how it should be.
The same problem applies for Arbejdsadresser, again you are using the autonumber (primary key) as the foreign key to person!
When you have done this you need to make a form for Arbejdsadresser and one for Privatadresser. Then drag and drop these two forms onto the form for person. This will give you two sub forms on the person form.
Sounds like a lot of work, but I'm sorry to say it is necessary or you will not got it working!
but if you only want ONE private address and ONE work address then the fields in these two tables should be in person!
tak Terry. Det vil jeg prøve. Ja, det lyder som en del arbejde, men hvis det løser problemet gør det ikke noget.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.