MSFlexGrid 使用


Private Sub SetGridTitle()
   With flexGrid
      .FormatString = "流水号|录入时间|赔案号|保单号|被保险人|厂牌型号|保险类型|牌照号码|使用性质|业务部门|业务员|理赔员|立案日期|合计"
     
      .ColAlignment(0) = flexAlignLeftCenter
      .ColAlignment(1) = flexAlignLeftCenter
      .ColAlignment(2) = flexAlignLeftCenter
      .ColAlignment(3) = flexAlignLeftCenter
      .ColAlignment(4) = flexAlignLeftCenter
      .ColAlignment(5) = flexAlignLeftCenter
      .ColAlignment(6) = flexAlignLeftCenter
      .ColAlignment(7) = flexAlignLeftCenter
      .ColAlignment(8) = flexAlignLeftCenter
      .ColAlignment(9) = flexAlignLeftCenter
      .ColAlignment(10) = flexAlignLeftCenter
      .ColAlignment(11) = flexAlignLeftCenter
      .ColAlignment(12) = flexAlignLeftCenter
      .ColAlignment(13) = flexAlignLeftCenter
      .TextStyleFixed = flexTextInsetLight
   End With
End Sub
------------------------------------------------
sqltxt = "select * from useb"
rs.Open sqltxt, cnn, adOpenKeyset, adLockBatchOptimistic
If rs.EOF Then
MsgBox ("暂无用户")
MSFlexGrid1.Rows = 0
MSFlexGrid1.Cols = 0
Else
With MSFlexGrid1
.Rows = rs.RecordCount + 1
.Cols = rs.Fields.Count
For i = 0 To rs.Fields.Count - 1
.TextMatrix(0, i) = rs.Fields(i).Name
Next i
For t = 1 To rs.RecordCount

For i = 0 To rs.Fields.Count - 1
.TextMatrix(t, i) = rs.Fields(i)
Next i
rs.MoveNext
Next t
End With
End If

 

转载于:https://www.cnblogs.com/hhaapp/archive/2005/06/16/175276.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值