I have a created a SQL Database with a table called Tbl_Customer which
includes lots of Rows of customer information.
The primary Key is CustID which is an Identity (Auto Number)
I want to be able to create a new table called Tbl_Address which has
CustID as a foreign Key and I want to be able to add between 1 and 4
addresses (different types such as home, term time etc).
Eventually I want to be able to create a form so you can view the
customer details, and skip through the addresses in a sub form.
My problem is that as soon as I set the relationship as 1 to many, I
can no longer add any addresses; all I can view are the headers.
If I add a different primary key field to the Address table it will
allow me to do it, but I don't know what to set as the other primary
key field, as more than one customer may live at the same address, so
i cant choose the 1st line of address for example.
I was able to do this in Access, but it will not work for me in Access
Project / SQL Server Enterprise Manager.
Any Ideas / Help Appreciated.
includes lots of Rows of customer information.
The primary Key is CustID which is an Identity (Auto Number)
I want to be able to create a new table called Tbl_Address which has
CustID as a foreign Key and I want to be able to add between 1 and 4
addresses (different types such as home, term time etc).
Eventually I want to be able to create a form so you can view the
customer details, and skip through the addresses in a sub form.
My problem is that as soon as I set the relationship as 1 to many, I
can no longer add any addresses; all I can view are the headers.
If I add a different primary key field to the Address table it will
allow me to do it, but I don't know what to set as the other primary
key field, as more than one customer may live at the same address, so
i cant choose the 1st line of address for example.
I was able to do this in Access, but it will not work for me in Access
Project / SQL Server Enterprise Manager.
Any Ideas / Help Appreciated.
Comment