Hello,
I am VB beginner.
currently I am doing an attendance project.
I am not getting how to display the name entries entered in combo box into datagrid.
Please help me.
Oprn up a new form,
Bring into your project these following REFERENCES+ COMPONENTS:
PROJECT REFERENCES:
Visual Basic for applications
Visual Basic runtime projects and procedures
VB objects and procedures
Microsoft ActiveX DataObjects 2.5 Library
OLE Automation
Microsoft Data Binding Collection (VB6,9 (SP4)
PROJECT COMPONENTS:
MAKE SURE YOU HAVE:
Microsoft Ado Data Control 6,0 (sp4 OLEDB)
Microsoft DataGrid Control 6.0 (sp5 OLEDB)
Once you select the above Components and References, your tool box will now have the two controls you will need to work with:
The first is the ADODC1,control
Drag it over to your form..right click and select ADODC Properties (general tab)
Then click on the use Connection String and use the BUILD to point it to the right mdb/and select the RecordSource Property to the command type (table you want to work with)
Second, drag over the data grid control.
From there the rest is fun, just have to go through the tabs and pick and choose what you want to appear in the grid... and how it should appear -font etc.
From there the rest is fun, just have to go through the tabs and pick and choose what you want to appear in the grid... and how it should appear -font etc.
If your name entries are entered in a combo box and you want to place them into the data gridm, you would write a SQL Select statemement to caputure them and then choose
adcmdText and insert the SQL test. This will then fill the data grid with the criteria you put together from the SQL
Statement.
If your name entries are entered in a combo box and you want to place them into the data gridm, you would write a SQL Select statemement to caputure them and then choose
adcmdText and insert the SQL test. This will then fill the data grid with the criteria you put together from the SQL
Statement.
like this one"
"SELECT Customers.FirstName," _
& " Customers.LastName," _
& " Customers.Custno," _
& " Customers.ID" _
& " FROM TableFirst F INNER JOIN TableSecond S" _
& " ON c.ID = s.ID" _
& " WHERE c.State = 'MA'" _
& " ORDER BY c.ID"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.