Dim CON As New ADODB.Connection Dim RsCountry As New ADODB.Recordset Dim RsState As New ADODB.Recordset Dim RsDist As New ADODB.Recordset Private Sub Form_Load() Dim PATH Dim X As Integer Dim Y As Integer Dim Z As Integer Dim Country As String Dim State As String Dim Dist As String PATH = App.PATH & "\COUNTRY.MDB" CON.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & PATH & ";Persist Security Info=False" CON.Open Call RsCountry.Open("COUNTRY", CON, 1, 2, -1) Call RsState.Open("STATE", CON, 1, 2, -1) Call RsDist.Open("DISTRICT", CON, 1, 2, -1) TreeView1.Nodes.Add , , "root", "COUNTRY'S NAME" 'Country For X = 1 To RsCountry.RecordCount Country = RsCountry(0) TreeView1.Nodes.Add "root", tvwChild, Country, RsCountry(1) 'State RsState.Filter = 0 RsState.Filter = "c_no='" + RsCountry(0) + "'" For Y = 1 To RsState.RecordCount TreeView1.Nodes.Add Country, tvwChild, RsState(1), RsState(2) 'Dist State = RsState(1) RsDist.Filter = 0 RsDist.Filter = "s_no='" + RsState(1) + "'" For Z = 1 To RsDist.RecordCount TreeView1.Nodes.Add State, tvwChild, RsDist(1), RsDist(2) RsDist.MoveNext Next Z RsState.MoveNext Next Y RsCountry.MoveNext Next X End Sub