| | |
data search from msflexgrid
Thread Solved |
I attach a file what was send by Shaik Akthar. I work with it a new
access file. He use Table, I use querie. But it not work.I modify some
code like:
MSFlexGrid.FormatString = "<DATENOW|<NAME|<DIAGNOSIS|<REMARKS"
MSFlexGrid.FormatString = "<Student ID|<Student Name|<Jamal|<Roll No"
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\DB2.MDB"
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\student admin.MDB"
rst.Source = "profile2"
rst.Source = "Student"
MSFlexGrid.AddItem Format(rst!DATENOW, "DD/MMM/YYYY") & vbTab & rst!Name & vbTab & rst!DIAGNOSIS & vbTab & rst!REMARKS
MSFlexGrid.AddItem Student ID & vbTab & rst!Student Name & vbTab & rst!Jamal & vbTab & rst!Roll No
It not worked. I don't know what I did wrong. anybody can help me?
if I want to work it with datagrid then what I need to do?
access file. He use Table, I use querie. But it not work.I modify some
code like:
MSFlexGrid.FormatString = "<DATENOW|<NAME|<DIAGNOSIS|<REMARKS"
MSFlexGrid.FormatString = "<Student ID|<Student Name|<Jamal|<Roll No"
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\DB2.MDB"
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\student admin.MDB"
rst.Source = "profile2"
rst.Source = "Student"
MSFlexGrid.AddItem Format(rst!DATENOW, "DD/MMM/YYYY") & vbTab & rst!Name & vbTab & rst!DIAGNOSIS & vbTab & rst!REMARKS
MSFlexGrid.AddItem Student ID & vbTab & rst!Student Name & vbTab & rst!Jamal & vbTab & rst!Roll No
It not worked. I don't know what I did wrong. anybody can help me?
if I want to work it with datagrid then what I need to do?
Dear Taher,
Your entire logic is correct. there is no mistake except for the fieldnames which u r using. they have a space in between. if u need to specify fieldnames which have space then use either of the following ways to denote them.
For field Student Id use
rst.Fields("Student Id")
or
rst![Student Id]
I have modified the project and am uploading it back for ur reference. hope this solves ur problem.
Another suggestion is that try not using the fieldnames with spaces, instead use a underscore to connect if the fieldname is of two words like
u can use "Student_Id" instead of "Student Id"
"Student_Name" instead of "Student Name" and "Roll_No" instead of "Roll No"
Regards
Shaik Akthar
Your entire logic is correct. there is no mistake except for the fieldnames which u r using. they have a space in between. if u need to specify fieldnames which have space then use either of the following ways to denote them.
For field Student Id use
rst.Fields("Student Id")
or
rst![Student Id]
I have modified the project and am uploading it back for ur reference. hope this solves ur problem.
Another suggestion is that try not using the fieldnames with spaces, instead use a underscore to connect if the fieldname is of two words like
u can use "Student_Id" instead of "Student Id"
"Student_Name" instead of "Student Name" and "Roll_No" instead of "Roll No"
Regards
Shaik Akthar
![]() |
Similar Threads
- how to print msflexgird and the data in this flexgrid (Visual Basic 4 / 5 / 6)
- MSFlexGrid Search Loop (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: print issue problem
- Next Thread: TreeView, adding more than 32767 nodes to the tree???
| 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





