Hello Everyone, I have an relation issue which is working in MS Access but not in SQL Server BE.
That was my relation completely same when I had BE also in MS Access. Now I did this in SQL Server BE with linked table.
I have following table structure and database relation between two tables.
==>I have two tables.
First is Vehicle, Second is Plan table
* Vehicle table fields (vehicleid (PK), vehicle, model, brand)
* Plan table fields (planid (PK), vehicleid, plandate1, plandate2, notes)
Relation is 1 to 1. (One vehicle can have one planning record. and one plan can be belong to one vehicle)
Therefore, relation is from vehicleid (PK) from vehicle table to vehicleid of plan table. (vehicleid of plan table is unique key)
In the form, when I I create one new vehicle and then entered plandate1, the problem is, vehicleid field of plan table, which is bound to auto incremental PK field of Vehicle table which is vehicleid, is not taking the same value.
In other words, vehicle id (PK) value is auto incremental so it is taking its value, but the problem, vehicleid of plan table which is unique key is not taking the same value as vehicleid (PK).
It was taking automatically the same number as vehicleid PK when it was in MS Access. What did it change? Where am I doing wrong?
I also attached the MS Access file while BE and FE is together in MS Access. You can look at it and see how plan.vehicleid field is taking the same value when vehicle.vehicleid (PK) takes autonumber.
Many thanks in advance
That was my relation completely same when I had BE also in MS Access. Now I did this in SQL Server BE with linked table.
I have following table structure and database relation between two tables.
==>I have two tables.
First is Vehicle, Second is Plan table
* Vehicle table fields (vehicleid (PK), vehicle, model, brand)
* Plan table fields (planid (PK), vehicleid, plandate1, plandate2, notes)
Relation is 1 to 1. (One vehicle can have one planning record. and one plan can be belong to one vehicle)
Therefore, relation is from vehicleid (PK) from vehicle table to vehicleid of plan table. (vehicleid of plan table is unique key)
In the form, when I I create one new vehicle and then entered plandate1, the problem is, vehicleid field of plan table, which is bound to auto incremental PK field of Vehicle table which is vehicleid, is not taking the same value.
In other words, vehicle id (PK) value is auto incremental so it is taking its value, but the problem, vehicleid of plan table which is unique key is not taking the same value as vehicleid (PK).
It was taking automatically the same number as vehicleid PK when it was in MS Access. What did it change? Where am I doing wrong?
I also attached the MS Access file while BE and FE is together in MS Access. You can look at it and see how plan.vehicleid field is taking the same value when vehicle.vehicleid (PK) takes autonumber.
Many thanks in advance