Private Sub City_AfterUpdate()
strSQL = "select hospitalname from hospital where city='" & Me.City & "'"
Me.HospitalName.RowSource = strSQL
End Sub
Private Sub Province_AfterUpdate()
strSQL = "select distinct city from hospital where province='" & Me.Province & "'"
Me.City.RowSource = strSQL
End Sub
Private Sub City_Enter()
If Not IsNull(Me.Province) Then
strSQL = "select distinct city from hospital where province='" & Me.Province & "'"
Else
strSQL = "select distinct city from hospital"
End If
Me.City.RowSource = strSQL
End Sub