标题: 请大侠帮帮忙看看错在哪! [打印本页] 作者: myu 时间: 2002-8-9 06:15 标题: 请大侠帮帮忙看看错在哪! Tony兄给我做的编码,运行很好,我只是改了一下要去的表(由bcroutingstagestracking变为FGITacking),这段代码不工作,请大侠帮助看看,哪里有错?谢谢!
Private Sub ToFGI_Click()
DoCmd.SetWarnings False
If ToFGI = 0 Then
DoCmd.RunSQL "delete from FGITracking where sn=" & Sn
Else
DoCmd.RunSQL "insert into FGITracking (sn) values ('" & Sn & "')"
End If
DoCmd.SetWarnings True
End Sub作者: 明莱 时间: 2002-8-9 16:44
TONY总版主写的吗?不会有错的吧!我就不看了。作者: HG 时间: 2002-8-9 16:46
docmd.runsql "insert into fgitracking(col1,col2,col3...)
select col1,col2,col3... from desttable where col1 = sn 作者: myu 时间: 2002-8-9 17:58
Hi, Brother HG
Can you give me the detail about your code? I want the sn of the wodetailtracking table auto to the same field of the fgitracking table. Thanks a lot! I don't know how to use sql code.作者: HG 时间: 2002-8-9 19:23
your err sql sql code:
look this:
insert into tablename select * from tablename where columnsname = "exp"
or
insert into tablename(columns1,columns2)
select col1,col2 from tablename where col1 = "exp"
------------------------------------------------------
columns1 <->col1,columns2<->col2....