|
写了个追加记录查询,但是实现不了想要的功能,请各位帮助看一下
Set rs = db.OpenRecordset("SELECT t1.id_i, t1.a, t1.b, t1.c FROM t1;", dbOpenDynaset)
sql = "INSERT INTO t (a, b, c ) SELECT t1.a, t1.b, t1.c FROM t1;"
DoCmd.RunSQL sql
Set rsa = db.OpenRecordset("SELECT t.ID, t.[no], t.a, t.b, t.c FROM t WHERE ((Not (t.ID) Is Null) AND ((t.[no]) Is Null));", dbOpenDynaset)
If Not IsNull(Me.t2) Then
rsa.MoveFirst
rsa.MoveLast
If rsa.RecordCount > 0 Then
rsa.MoveFirst
For a = 0 To rsa.RecordCount - 1
With rsa
.Edit
!no = Me!t2
.Update
.Close
End With
Next
rs.MoveNext
'Else
End If
End If
结果如下:
ID noabc191147123192
456193
789194
987195
654196
321
但我想得到的样子是,
IDnoabc191147123192147456193147789194147987195147654196147321
请问如何改
我把文件也传上去,但好像不是很好用,谢谢各位了
有点乱请见谅。
在线等。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|