Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Statement
Message
From
19/05/2003 12:41:20
 
 
To
19/05/2003 12:18:59
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00789910
Message ID:
00790043
Views:
19
This code creates a new recordset, creates a column called Country, populates it with some values and binds the recordset to a datagrid. I think that's what you wanted:
    Dim rs As Recordset
    Set rs = New Recordset
    
    rs.Fields.Append "Country", adVarChar, 100
    
    rs.Open
    rs.AddNew "Country", "USA"
    rs.AddNew "Country", "Canada"
    rs.AddNew "Country", "England"
    Set DataGrid1.DataSource = rs
    DataGrid1.AllowUpdate = False
Roman

>Hi Roman,
>
>See u again, I'm very appreicate your help.
>
>Actually, the table for "USA","Canda","England" is never exists, cause I don't want to build a table and only for this 3 records. And actually I wrote a ActiveX object which able to automatically run a select statement after user press "CTRL+Enter" in the text box, and load the result (recordset) into a grid and allow users to return the selected value back to the text box.
>
>So now, I'm looking for a way to load "USA","Canada",England" into a result (recordset) as single column :
>Country
>______________
>USA
>Canda
>England
>
>So that my ActiveX able to load this 3 values into the grid under column "Country"
>
>
>Is this much better now? I hope you could give me some valuable advise.
>
>Thanks alot
>Aston
Roman Rehak, MCSD, MCDBA, MCSA
Competitive Computing
354 Mountain View Drive
Colchester, VT 05446-5824
802-764-1729
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform