Hi guys,
I need help to populate a DataGrid usingi the ADODB 2.8 by MS-Access Table.
Here's the code which I use for ADODC but in my case I want to use ADODB.
VB Code:
Private Sub Combo1_Click() SQL = "Select EmployeesData.[FirstName], EmployeesData.[SecondName], Contacts.[Mobile]" SQL = SQL & "From [EmployeesData], [Contacts]" SQL = SQL & "Where EmployeesData.[EmpID] = Contacts.[EmpID]" SQL = SQL & "And EmployeesData.[FirstName]='" & Combo1.Text & "';" Adodc1.RecordSource = SQL ' Execute your query Set DataGrid1.DataSource = Adodc1 ' Bind to the data control
Can anyone help please ??
Many thanks in advance,
habibalby




Reply With Quote