Results 1 to 3 of 3

Thread: MSHFlexGrid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    25
    The answer is probably simple. I have bound the grid to a recordset, but I don't want to display all the field in the recordset. I found I can do this at design time through the properties. Under the band tab. How can I change this during run time?


  2. #2
    Addicted Member
    Join Date
    Apr 1999
    Location
    Freeport
    Posts
    204
    You want to do a SQL on your datacontrol. At design time make a text box and a button on the form. Then place this code in the button Click event. This is for a person imfo. by name.
    Dim Sql As String
    Dim name As String
    Dim db As Database
    Dim dbs As Recordset
    name = Text1
    Sql = "Select* from Tablename where field = '" & name & "'"
    Set db = OpenDatabase("Database Path")
    Set dbs = db.OpenRecordset(Sql)
    Set Data1.Recordset = dbs
    Data1.Refresh

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    25
    I think I used the wrong term. When I said field, I meant the columns that display in the MSHFlexGrid. I have already used a SQL command to create a recordset but I don't want each field in a record to be displayed in a column.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width