locked
VB syntax RRS feed

  • Question

  • User522430173 posted

    Can someone tell me how to make the following query run?  I suppose I am doing something wrong with the quotes.  The system will not let me use single doublequotes.

        DoCmd.RunSQL "SELECT Orders.FY, getfyear([cardpurdate]) AS CardPurYr, getFmonth([cardpurdate]) AS CardMonth, Orders.CardPurDate, OrgCodes.OrgCodes, Orders.BOC, Orders.GrandTotal, Orders.Vender, MonthName(Month(CDate([CardPurDate]))) AS thedate, DLookUp(""[Fundcode]"", ""FundCodes"", ""[OrgCodeID] ='"" & [Orgcodes] & ""'"") AS funcode INTO cc_Approved FROM Orders;", -1
    regards
    Milton

    Monday, December 8, 2008 2:42 PM

Answers

  • User-821857111 posted

    This isn't VB or ASP.NET, is it?  Looks more like Access VBA to me.  If that's the case, you would be better advised asking your question in an Access Applications forum such as www.utteraccess.com.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 8, 2008 2:50 PM

All replies

  • User-821857111 posted

    This isn't VB or ASP.NET, is it?  Looks more like Access VBA to me.  If that's the case, you would be better advised asking your question in an Access Applications forum such as www.utteraccess.com.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 8, 2008 2:50 PM
  • User522430173 posted

    Thanks,
    UtterAccess is great.

    Monday, December 8, 2008 3:33 PM
  • User-319574463 posted

     Thank you to both of you - I have added the Utter Access Forum to to FAQ on Other Forums at http://forums.asp.net/p/1337412/2699239.aspx#2699239

    Sunday, December 14, 2008 9:36 AM