小弟初学vb
问题1
用msflexgrid控件显示access2000数据,msflexgrid将表中所有字段名都显示出来,其中有些字段是备注内容,能不能自定义显示的所需要的字段
问题2 
因为表中的字段名是英文,能不能在显示时改成中文字段名
问题3
怎么才能查看代码?
例如:用data控件作数据连接,我怎么看数据连接代码!
望大侠指教

解决方案 »

  1.   

    你试试吧,好用的
    记得要引用ado
    我用的是datagrid和msflexgrid差不多,你改改
       Dim WithEvents adoPrimaryRS As Recordset '数据库连接对象
    Private Sub Command1_Click()
       'strsql 是你的查询语句 你可以order by 排序的字段,
       '例如select xm as 姓名,那么datagrid上的标题就是姓名. 
       strsql="select 字段 from 表"
       Set Db = New Connection
       Db.CursorLocation = adUseClient
       '下面的连接数据字符串你要修改一下
       Db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\计划管理系统.mdb;Persist Security Info=False"
       Set adoPrimaryRS = New Recordset
       adoPrimaryRS.Open strsql, Db, adOpenStatic, adLockOptimistic
       Set DataGrid1.DataSource = adoPrimaryRS
    end sub
      

  2.   

    问题2 
    因为表中的字段名是英文,能不能在显示时改成中文字段名?---------------------------
    用别名
    sql="select ID as 卡号,name as 姓名,salary as 薪水 from table"
      

  3.   

    谢谢 cuilei197979(风) ( ) 信誉:100 我试了用datagrid,感觉比msflexgrid好用,我决定用datagrid