|
-
February 15th, 2000, 12:24 AM
#1
Need Help tonight
I have a program where I want to search for either an employee id, last name or state. Doing that is not the problem, what I want to know is if the search results can be displayed in a datagrid. If not, I know I can make the results display in a listbox, but I would then need to pass the selected listbox index to the form. I have a search set up now that will search through the recordset and and display the first record matching the search criteria in the controls on the form, but if there are more than 1 record that matches the search criteria, the user can not view the results of the second record found and on. Could sombody please help me, my assignment is due on Wednesday, February 16,2000. Thanks in advance
-
February 15th, 2000, 05:08 AM
#2
Re: Need Help tonight
Hi,
Do you know what type of grid you are going to use? I use MSFlexGrid with the following code
'Setup Your Database Connection and query Here
MSFlexGrid1.Clear 'Clear Old grid and Specify new grid settings
MSFlexGrid1.Rows = 1
MSFlexGrid1.Cols = 2
MSFlexGrid1.TextMatrix(0, 0) = "Field One"
MSFlexGrid1.TextMatrix(0, 1) = "Field Two"
While RS_MYTABLE.EOF = false
MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1 ' Add a new Row to the Grid
MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows, 0) = RS_MYTABLE.Fields("Field1").Value 'Specify value for col 1
MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows, 1) = RS_MYTABLE.Fields("Field2").Value 'Specify value for col 2
RS_MYTABLE.MoveNext
Wend
Hope that helps
Ian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|