| | |
How to Show Database In DataGrid Using DAO
![]() |
•
•
Join Date: Aug 2006
Posts: 1
Reputation:
Solved Threads: 0
Hi there,
I just registered and see that u have solve many problems for many ppl .. and I get good and new info and codes from u..
I'm having problem with Datagrid bcoz for really I'm not advanced devoloper,I'm using DAO to show me the records from database to the List,,which is not reconized for my project,,Now ,, I need to use Datagrid on my search form to show my search result.. so plz help me fast,, attachment is a Screenshot for my Search form..
this is the code and it is working on List,but i need code for datagrid:
I just registered and see that u have solve many problems for many ppl .. and I get good and new info and codes from u..
I'm having problem with Datagrid bcoz for really I'm not advanced devoloper,I'm using DAO to show me the records from database to the List,,which is not reconized for my project,,Now ,, I need to use Datagrid on my search form to show my search result.. so plz help me fast,, attachment is a Screenshot for my Search form..
this is the code and it is working on List,but i need code for datagrid:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub cmdFind_Click() If txtFind.Text = "" Then MsgBox "Enter text to search for", vbOKOnly, "Error" Else If cmbFind.Text = "User Name" Then Set rec = data.OpenRecordset("select * from PC where PC.UserName Like '*" & txtFind.Text & "*'") With rec lstFind.Clear Do Until .EOF lstFind.AddItem ("User Name: " & .Fields(0) & " Owner: " & .Fields(1) & " User Type: " & .Fields(2)) .MoveNext Loop End With ElseIf cmbFind.Text = "PC Serial Number" Then Set rec = data.OpenRecordset("select * from PC where PC.PCSerialNumber Like '*" & txtFind.Text & "*'") With rec lstFind.Clear Do Until .EOF lstFind.AddItem ("User Name: " & .Fields(0) & " Owner: " & .Fields(1) & " User Type: " & .Fields(2)) .MoveNext Loop End With End if End Sub
![]() |
Similar Threads
- inser data into database (JSP)
- Create tables in access database by DAO liberary (Visual Basic 4 / 5 / 6)
- Show the database (Pascal and Delphi)
- save textbox values to database (ASP.NET)
- Finding a Record in VB6 ADO (Visual Basic 4 / 5 / 6)
- SOS - datagrid problem (ASP.NET)
- Modify data in Datagrid (VB.NET)
- Placing a Multiline textbox over a datagrid (VB.NET)
- The Datagrid: How does one fill text boxes in edit mode with their original content? (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: OLE object question
- Next Thread: access database search and display
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





