Results 1 to 4 of 4

Thread: rowsource

  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: rowsource

    acc.RowSource = "select [acc #],[num] from [Numbers] where [Vendor Name] = '" & [vendor] & "' Group By [acc #] and Group By [num] Order By [acc #]"

    When i run it, there is syntax error.

    But, when I use this
    acc.RowSource = "select [acc #],[num] from [Numbers] where [Vendor Name] = '" & [vendor] & "' Order By [acc #]"

    Then, it works.

    So, how can I add to the "Group By" in the above code?
    Please let me know, thanks.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    open any access mdb
    make a new query looking at any table with more than one field
    hit the Sigma button in the tool bar
    switch the query to SQL view.

    ...what is the magic difference in your SQL?

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Quote Originally Posted by accessman2
    acc.RowSource = "select [acc #],[num] from [Numbers] where [Vendor Name] = '" & [vendor] & "' Group By [acc #] and Group By [num] Order By [acc #]"
    Try
    acc.RowSource = "select [acc #],[num] from [Numbers] where [Vendor Name] = '" & [vendor] & "' Group By [acc #] , [num] Order By [acc #]"

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Woohoo!!! So long as someone is willing to spoon-feed him, there's no need to actually learn how to help himself. Aces to you accessman2!!
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •