|
Me.student_sub.Form.RecordSource = "select top " & Me.txtCount & " * from student"
以上的recordsource中的SELECT语句是必须将其中的所有字段选中吗?是否可以只选其中几个?
我做的是个查询窗体,所以不能在SELECT后面用*来表示,我应该怎么做呢?
以下是我的尝试,但是不对,请指正:
Me.RecordSource = "select top 10 * from (SELECT XXX_LB.DOMAIN, XXX_LB.USUBJID, XXX_LB.LBSEQ, XXX_CO.RDOMAIN, XXX_CO.USUBJID, XXX_CO.COSEQ, XXX_LB.LBDTC, XXX_LB.LBFAST, XXX_LB.LBTEST, XXX_LB.LBSTAT, XXX_LB.LBORRES, XXX_LB.LBORRESU, XXX_LB.LBNRIND, XXX_LB.LBREASND, XXX_LB.LBGRPID, XXX_CO.COVAL FROM XXX_LB INNER JOIN XXX_CO ON (XXX_LB.DOMAIN = XXX_CO.RDOMAIN) AND (XXX_LB.USUBJID = XXX_CO.USUBJID) AND (XXX_LB.LBSEQ = XXX_CO.COSEQ))"
|
|