Convert Query SQL to VBA Code in Microsoft Access. Add Line Breaks, Quotes, vbNewLine, and More.

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 26

  • @scottaxton2513
    @scottaxton2513 3 ปีที่แล้ว +4

    5-Stars! This video alone just saved me HOURS of work converting a db using macros from the 1990's to this century.
    Kudos and Thanks!
    Scott

    • @599CD
      @599CD  3 ปีที่แล้ว

      My pleasure, Scott.

  • @johnmcfarlane8805
    @johnmcfarlane8805 4 ปีที่แล้ว +1

    Remarkable stuff from our favourite MVP!

    • @599CD
      @599CD  4 ปีที่แล้ว

      Technically "former" MVP. The Microsoft MVP award is an annual prize. I was awarded it in 2014 and 2015, but then due to health reasons I took some time off and wasn't actively involved in the tech community for a few years. Hopefully they'll reconsider me in 2021. I love helping folks, posting my videos, and answering emails, which is one of the things they consider.

  • @ssdusd
    @ssdusd 2 ปีที่แล้ว +1

    Greate!. But how will you go back to the base query after changing RecordSource?

    • @599CD
      @599CD  2 ปีที่แล้ว

      I get a ton of questions every day, and I don't have time to answer them all here on TH-cam. Feel free to submit your question on my website at: 599cd.com/AskYT

  • @timfulton6920
    @timfulton6920 3 ปีที่แล้ว +3

    Looks good and I love the concept. I hadn't done any lessons on SQL in VBA and formatting but this was easy to follow. I did find I ran info an error when trying to use the SQL statement with "CurrentDb.OpenRecordset"
    "Error Number: 3131- Syntax error in FROM clause."
    I found it was because my SQL statement didn't have a space at the end of the FROM Line.
    "FROM QRY_SO_ALL" & _ (Incorrect)
    "FROM QRY_SO_ALL " & _ (correct)
    I didn't see in the video a spot that addressed that in the video. I hope this helps anyone with a similar issue.

    • @599CD
      @599CD  3 ปีที่แล้ว

      Yeah that could be. It's a very "version 1.0" piece of software.

  • @teemoto3923
    @teemoto3923 ปีที่แล้ว

    One the first functions i add to my dbs is one that adds vbnewlines and give it a short name. for example cr(2) returns two lines. Saves on typing

  • @zoomingby
    @zoomingby 7 หลายเดือนก่อน +1

    The fact that Access creates SQL in such a way that can't be readily used in VBA is inexcusable and absurd.

  • @ashishtrivedi8253
    @ashishtrivedi8253 3 ปีที่แล้ว

    With docmd.runqul statement or me.recordset statement error saying required sql statement... I search on net it says only update or similar statement can run by this .. select statement can't! I can see your doing it.. please tell me how? Thx in advance

    • @599CD
      @599CD  3 ปีที่แล้ว

      Without seeing your statements, it's impossible to tell what the problem is. I did have one user who discovered that if you use SPACES in your field or table names, my converter doesn't work. But my Rule #1 that I teach in Access Beginner Level 1 is DON'T use spaces in field or table names. :)

    • @ashishtrivedi8253
      @ashishtrivedi8253 3 ปีที่แล้ว

      @@599CD sorry for late response on this but that point of time i was desperate ;) but finally i figured it out, Docmd cant execute select statement. If anyone wants to try that can use ADO and it will work.

  • @colinhursell9176
    @colinhursell9176 4 ปีที่แล้ว +1

    Thank you! Really useful information!

    • @599CD
      @599CD  4 ปีที่แล้ว

      Glad you like it.

  • @mohammedalsarraj9963
    @mohammedalsarraj9963 ปีที่แล้ว

    Great review

    • @599CD
      @599CD  ปีที่แล้ว

      Thanks

  • @nairobi203
    @nairobi203 ปีที่แล้ว

    This is like Parmesan Cheese on a nice plate of Spaghetti with Tomato sauce.... Perfect... -:)

    • @599CD
      @599CD  ปีที่แล้ว

      Don't fuggetta bout da meat BALLS!

  • @mafgeology
    @mafgeology 4 ปีที่แล้ว +1

    Great 👍

    • @599CD
      @599CD  4 ปีที่แล้ว

      Thank you 👍

  • @dbdata9836
    @dbdata9836 4 ปีที่แล้ว

    thanks

    • @599CD
      @599CD  4 ปีที่แล้ว

      Welcome