|
-
Mar 18th, 2000, 04:58 AM
#1
Thread Starter
Junior Member
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?
-
Mar 18th, 2000, 05:15 AM
#2
Addicted Member
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
-
Mar 18th, 2000, 06:14 AM
#3
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|