|
7#
楼主 |
发表于 2016-12-12 09:50:05
|
只看该作者
本帖最后由 pyh512 于 2016-12-12 10:29 编辑
Private Sub 粘贴当前记录_Click()
Dim strSQL As String
Dim cnn As Object
Dim rst As Object
Set cnn = CurrentProject.Connection
strSQL = "SELECT * FROM tbl钢筋原材 where 炉批号= " & SQLText(Me.炉批号)
Set rst = OpenADORecordset(strSQL, , cnn)
Me![工程名称] = rst![工程名称]
Me![材料名称] = rst![材料名称]
rst.Close
Set rst = Nothing
Set cnn = Nothing
End Sub
在"frm钢筋原材"窗体中的"粘贴当前记录_Click()"过程中的“Me![材料名称] = rst![材料名称]"后面插入以下代码:
Me![品种] = rst![品种]
Me![牌号] = rst![牌号]
Me![规格] = rst![规格]
Me![尺寸] = rst![尺寸]
Me![合格证编号] = rst![合格证编号]
Me![炉批号] = rst![炉批号]
Me![生产厂家] = rst![生产厂家]
Me![进场日期] = rst![进场日期]
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|