设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 700|回复: 4
打印 上一主题 下一主题

请大侠帮帮忙看看错在哪!

[复制链接]
跳转到指定楼层
1#
发表于 2002-8-9 06:15:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2002-8-9 16:44:00 | 只看该作者
TONY总版主写的吗?不会有错的吧!我就不看了。
3#
发表于 2002-8-9 16:46:00 | 只看该作者
docmd.runsql "insert into fgitracking(col1,col2,col3...)
               select col1,col2,col3... from desttable where col1 = sn
4#
 楼主| 发表于 2002-8-9 17:58:00 | 只看该作者
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.
5#
发表于 2002-8-9 19:23:00 | 只看该作者
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....
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-7-1 06:50 , Processed in 0.095117 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表