How to make cascade update/delete?

Gigantcus

New member
Local time
Today, 02:18
Joined
Jan 11, 2015
Messages
7
Hello, What I'm trying to do is making Cascade update and delete between two tables. For example in my case I have Field called Full name in table1 and I want the same field in table2 that will update when something is added in table1 and vice versa. I have tried relationship but I got an error that those fields does not have any unique value :confused: any idea how can I do this? :banghead:
 
Sounds like you have your tables improperly structured. Can you post the full structure of your tables along with some sample data?
 
Will do that once I get home.

/Edit
Here are the images. The data in appointment table is just copied from customer table.

note: the data is made up.
 

Attachments

  • 1.PNG
    1.PNG
    46 KB · Views: 98
  • 2.PNG
    2.PNG
    62.5 KB · Views: 91
  • 3.PNG
    3.PNG
    83.8 KB · Views: 89
  • 4.PNG
    4.PNG
    68 KB · Views: 94
Last edited:
3 things all pertaining to Appointment TS, the last of which deals with the issue you have:

1. 'Time' is a reserved word and therefore a poor choice for a field name. Long story short, it makes coding and writing queries more difficult. (You should also remove spaces in table/field names for this reason too.) Usually you want to prefix data like this (Date, Time, Name) with what it represents (e.g. ApptDate, ApptTime, PatientName, etc.). However...

2. Look at Appointment TS in design view. You will see that the Appointment Date has a Data Type of Date/Time. That means it can hold both date and time in that one field. Instead of an Appointment Date and a Time field you should store this information in one field (AppointmentTime).

3. You already have Customer ID field in Appointment TS, so you don't need any other data from Customer TS in that table. With that Customer ID you can create a query and link those two tables together and get all the data in them together. That is how you get the Full Name and Appointment data together, not by assigning it a value to a field inside Appointment TS.
 

Users who are viewing this thread

Back
Top Bottom