|
5#
楼主 |
发表于 2008-3-20 11:47:55
|
只看该作者
在保存记录按钮的点击事件里这样写?
Private Sub 保_存_Click()
On Error GoTo Err_保_存_Click
Dim sql As String
sql = "INSERT INTO 字段表 ( ProducerCode ) SELECT 产品.ProducerCodeFROM 产品 LEFT JOIN 字段表 ON 产品.ProducerCode = 字段表.ProducerCode GROUP BY 产品.ProducerCode, 字段表.ProducerCode HAVING (((字段表.ProducerCode) Is Null)) ORDER BY 产品.ProducerCode;"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_保_存_Click:
Exit Sub
Err_保_存_Click:
MsgBox Err.Description
Resume Exit_保_存_Click
End Sub |
|