what sql command i must use. this is my current command but it give me an error saying "The specified filed 'ClientNo' could refer to more than one table listed in the FROM clause of your sql statemate."
Try
dc.Connection = conn
dc.CommandText = "SELECT * FROM tblClient, tblClientInfo WHERE ClientNo = '" & ClientNo & "'"
dr = dc.ExecuteReader
If dr.HasRows Then
While dr.Read
frmClientsProfile.lblClientNo.Text = dr.Item(0)
frmClientsProfile.lblFirstName.Text = dr.Item(1)
frmClientsProfile.lblLastName.Text = dr.Item(2)
frmClientsProfile.lblAge.Text = dr.Item(3)
frmClientsProfile.lblAddress.Text = dr.Item(4)
frmClientsProfile.lblBirthday.Text = dr.Item(5)
frmClientsProfile.lblGender.Text = dr.Item(6)
frmClientsProfile.lblContactNo.Text = dr.Item(7)
frmClientsProfile.lblGFirstName.Text = dr.Item(8)
frmClientsProfile.lblGLastName.Text = dr.Item(9)
frmClientsProfile.lblGAge.Text = dr.Item(10)
frmClientsProfile.lblGAddress.Text = dr.Item(11)
frmClientsProfile.lblGBirthday.Text = dr.Item(12)
frmClientsProfile.lblGGender.Text = dr.Item(13)
frmClientsProfile.lblGContactNo.Text = dr.Item(14)
frmClientsProfile.lblLoan.Text = dr.Item(16)
frmClientsProfile.lblPaid.Text = dr.Item(17)
frmClientsProfile.lblBalance.Text = dr.Item(16) - dr.Item(17)
frmClientsProfile.lblSavings.Text = dr.Item(18) - dr.Item(19)
'frmClientsProfile.lblTermStart.Text = dr.Item(19)
'frmClientsProfile.lblTermEnd.Text = dr.Item(20)
End While
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try