Dim mysql$
     mysql$ = "Select"
     mysql$ = mysql & " * "
     mysql$ = mysql & " From " & Combo4.Text
     mysql$ = mysql & " Where " & Combo4.Text & ".ADate Between #" & CheckDate & "# And #" & CheckDate1 & "#"              
   Source = mysql

解决方案 »

  1.   

    Source = "select * from " & Combo4.Text & " where  (ADate Between #" & CheckDate & "# And #" & CheckDate1 & "#)" 
    我再用一下select max() from ...where....嵌套一下,后面那句是跟着前一句写呢,还上另起一行呢?
      

  2.   

    请问一下,取一列中的最大值好象不能用Max()函数的!一用这个函数它就会报错。请问怎么取一列中的最大值呢?
    就像Source = "select " & Max(VC) & " from " & Combo4.Text & " where  (ADate Between #" & CheckDate & "# And #" & CheckDate1 & "#)" 
    一运行它就会报max是错的!能告诉我怎么做吗?
      

  3.   

    mysql$ = mysql & " Where " & Combo4.Text & ".ADate Between # " & CheckDate & " And " & CheckDate1 & "#"
      

  4.   

    mysql$ = mysql & " Where " & Combo4.Text & ".ADate Between # " & CheckDate & "# And #" & CheckDate1 & "#"
      

  5.   

    Source = "select Max(" & VC & ")  from " & Combo4.Text & " where  (ADate Between #" & CheckDate & "# And #" & CheckDate1 & "#)"