List:MySQL ODBC« Previous MessageNext Message »
From:Michiel Kreutzer Date:April 12 1999 12:32pm
Subject:referential integrity in Access
View as plain text  
Hi,

My access front-end is getting closer to running all the time. Some
minor problems remain.

One of these problems is the fact that MS Access97 cannot enforce
referential integrity in linked ODBC tables. So if I delete a record,
and then insert a new one, the new record (New ID = old ID) has the
relations of the previous records. Is there a way to fix this?

My first idea is to put in all forms where I intend to delete records
some code like:

Sub Form_Delete(cancel as integer)
Dim message as string
message = "R U Sure ? "
If msgbox(Message,vbOKCancel,"confirm") = vbcancel then
	cancel = true
Else
	CurrentDB.Execute "DELETE FROM tblWhatever WHERE ID = " & Me![ID] & ";"
End Sub

this did not really work....

Any other suggestions? Am I on the right track? Or should this be taken
care of on the server side?
Thread
referential integrity in AccessMichiel Kreutzer12 Apr