I have 2 table that have the same field [DischargeDate], I want to auto update Table2 when I type in the data in table1. I write the following code, but it didn't work.
Private Sub txtDischarge_AfterUpdate()
Dim cnnDB As New ADODB.Connection
Dim rsObject As New ADODB.Recordset
Set cnnDB = CurrentProject.Connection
rsObject.Open "MedicalInformation", cnnDB, adOpenStatic
With rsObject
.Find "[EngName] = 'Me![EngName]'"
.Update "#[DischargeDate]# = #Me![DischargeDate]#"
End With
Can anyone help
Private Sub txtDischarge_AfterUpdate()
Dim cnnDB As New ADODB.Connection
Dim rsObject As New ADODB.Recordset
Set cnnDB = CurrentProject.Connection
rsObject.Open "MedicalInformation", cnnDB, adOpenStatic
With rsObject
.Find "[EngName] = 'Me![EngName]'"
.Update "#[DischargeDate]# = #Me![DischargeDate]#"
End With
Can anyone help