主题:我想实现用sub过程call调用数据库
大家帮帮忙啊,我想实现用sub过程call调用数据库
在工具栏数组中
Case Is ="frist"
Call First
我如何在sub过程中调用这个啊
Public Sub displayProducts()
cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\db\db1.mdb;"
cn.Open
Dim rs As New ADODB.Recordset
sql = "select top 1 * from 入库单"
rs.Open sql, cn
lrtext(0).Text = rs.Fields("入库日期")
lrtext(3).Text = rs.Fields("仓库")
lrtext(6).Text = rs.Fields("入库类别")
lrtext(9).Text = rs.Fields("业务员")
lrtext(14).Text = rs.Fields("订单号")
lrtext(1).Text = rs.Fields("采购类型")
lrtext(4).Text = rs.Fields("供应商")
lrtext(7).Text = rs.Fields("部门")
lrtext(10).Text = rs.Fields("保管人")
lrtext(13).Text = rs.Fields("采购计划号")
lrtext(2).Text = rs.Fields("入库单号")
lrtext(5).Text = rs.Fields("收料通知单号")
lrtext(8).Text = rs.Fields("票据类型")
lrtext(11).Text = rs.Fields("验收人")
lrtext(12).Text = rs.Fields("备注")
i = rs.Fields("id")
rs.Close
在工具栏数组中
Case Is ="frist"
Call First
我如何在sub过程中调用这个啊
Public Sub displayProducts()
cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\db\db1.mdb;"
cn.Open
Dim rs As New ADODB.Recordset
sql = "select top 1 * from 入库单"
rs.Open sql, cn
lrtext(0).Text = rs.Fields("入库日期")
lrtext(3).Text = rs.Fields("仓库")
lrtext(6).Text = rs.Fields("入库类别")
lrtext(9).Text = rs.Fields("业务员")
lrtext(14).Text = rs.Fields("订单号")
lrtext(1).Text = rs.Fields("采购类型")
lrtext(4).Text = rs.Fields("供应商")
lrtext(7).Text = rs.Fields("部门")
lrtext(10).Text = rs.Fields("保管人")
lrtext(13).Text = rs.Fields("采购计划号")
lrtext(2).Text = rs.Fields("入库单号")
lrtext(5).Text = rs.Fields("收料通知单号")
lrtext(8).Text = rs.Fields("票据类型")
lrtext(11).Text = rs.Fields("验收人")
lrtext(12).Text = rs.Fields("备注")
i = rs.Fields("id")
rs.Close