Hi every body
I use MS Accress 2003 and VB.net 2005:
I have 3 tables
1. tblPatient
PateintID PatientName
1 John
2. tblPatient-EmetLink
PatientID EmergencyContactID
1 2
3. tblEmergencyCont
EmergencyContactID Surname
2 Beeter
The relationship between tables tblPatient and tblEmergencyCont is Many TO Many and tblPatient-EmetLink is used to link the 2 tables.
I am trying to Retrieve all the Emergency Contact for a particular patient from tblEmergencyCont.
I assume the SQL should be as following but I no it is not correct.
strEmegencyContact = "Select * From tblPatientRegister, tblPatient-EmetLink, tblEmergencyCont Where tblPatientRegister.PatientID = tblPatient-EmetLink.PatietID And tbltblEmergencyCont.EmergecyID = tblEmergencyContact.EmergecyID
Please Correct it for ME
I use MS Accress 2003 and VB.net 2005:
I have 3 tables
1. tblPatient
PateintID PatientName
1 John
2. tblPatient-EmetLink
PatientID EmergencyContactID
1 2
3. tblEmergencyCont
EmergencyContactID Surname
2 Beeter
The relationship between tables tblPatient and tblEmergencyCont is Many TO Many and tblPatient-EmetLink is used to link the 2 tables.
I am trying to Retrieve all the Emergency Contact for a particular patient from tblEmergencyCont.
I assume the SQL should be as following but I no it is not correct.
strEmegencyContact = "Select * From tblPatientRegister, tblPatient-EmetLink, tblEmergencyCont Where tblPatientRegister.PatientID = tblPatient-EmetLink.PatietID And tbltblEmergencyCont.EmergecyID = tblEmergencyContact.EmergecyID
Please Correct it for ME