参照http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=107839
要运用的实例没有类似“订单编号”这一列,list函数的代码几公里长,不知从哪里下手改造下面的代码
cmd.CommandText = "Select Top " & pagerows & " *,(数量*单价) As 金额 from (Select [_identify] as 订单编号,日期,客户,(Select sum(数量) from {订单} where 订单编号={订单}.订单编号) As 数量,单价,产品 From {订单}) A where "
If flt > "" Then
cmd.CommandText &= iif(page=0, "1=1 and " & flt , "[订单编号] not In (Select top " & pagerows * page & " [_identify] from {订单} order by [_identify]) and " & flt & " order by [订单编号]")
Else
cmd.CommandText &= iif(page=0, "1=1" , "[订单编号] not In (Select top " & pagerows * page & " [_identify] from {订单} order by [_identify]) order by [订单编号]")
End If