Write Data to Access Database from Excel UI. Excel to Access Automation using VBA - 2

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • You can now support by buying any of the Projects or Source Code.
    📥Downloads: pamaitech.com/...
    👍 Support: paypal.me/pama...
    ✉️ Contact: contact@pamaitech.com
    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    WHAT TO WATCH NEXT
    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    * * * VSTO (Visual Studio Tools for Office)
    • VSTO e01 - Get up to s...
    * * * Office Add-ins Platform
    • Excel Web Add-in E1 - ...
    * * * Professional UI/UX
    • VBA UI UX-1: Build Pro...
    * * * PDF Automation using VBA
    • VBA PDF Automation - R...
    * * * RibbonX First-Class Ribbon Customization
    • RibbonX 01 - Build Fir...
    * * * Word Automation using VBA
    • Real-life Word App Aut...
    * * * PPT Automation using VBA
    • Automate PowerPoint Pr...
    * * * Custom Menu using VBA
    • Custom Menu - E01. Ad...
    * * * Sharepoint Automation Using VBA
    • How to create Custom S...
    * * * Access DB Automation using VBA
    • Create Access Database...
    * * * SQL Server Automation Using VBA
    • VBA and SQL Server - V...
    * * * Web Automation using VBA
    • Extract any Web table ...
    * * * Excel Password Recovery/Reset
    • How to reset forgotten...
    * * * Errors and Solutions
    • How to fix missing Dat...
    * * * Plug and Play Series
    • VBA to get sheets from...
    * * * Office Quick Tips
    • Reset Forgotten VBA Pr...
    * * * Dark theme VBE
    • How to customize VBA E...

Комментарии • 45

  • @thamonito
    @thamonito 4 года назад +4

    Bro, thank you for the easy to follow and effective video. You helped me out a lot!

    • @VBAA2Z
      @VBAA2Z  4 года назад +1

      Thanks for your comment, glad to hear it helped you.
      Please do not forget to subscribe for upcoming videos.

  • @JuribSunn
    @JuribSunn Год назад +1

    Thanks for sharing Sir.

    • @VBAA2Z
      @VBAA2Z  Год назад

      So nice of you

  • @mtanany6
    @mtanany6 3 года назад +1

    Million Like, thank you so much

    • @VBAA2Z
      @VBAA2Z  3 года назад

      Glad it helped. You're most welcome.

  • @adriengrinfan-belly4054
    @adriengrinfan-belly4054 2 года назад +1

    Thank you , Clean and usefull

    • @VBAA2Z
      @VBAA2Z  2 года назад

      You are welcome!

  • @AndrewSchrepfer
    @AndrewSchrepfer Год назад

    I went through the tutorial, and updated the way you described. After clicking debug, it went just fine. I ran the macro, and the data has not updated in Access. Any ideas?

  • @AdrianChetty
    @AdrianChetty 4 года назад +1

    Thank you for this!

    • @VBAA2Z
      @VBAA2Z  4 года назад

      Glad it was helpful!

  • @shaktisehra6672
    @shaktisehra6672 2 года назад +1

    Is there a way to copy a range from Excel spreadsheet as is and paste it in one go into an Access table with the same headers?

    • @shaktisehra6672
      @shaktisehra6672 2 года назад +1

      For more context, Excel has 100 columns of calculations and the VBA code in excel cycles through each case for which those 100 columns get updated each time. The goal is to export the values from those 100 columns for all those cases one by one into an access database

    • @VBAA2Z
      @VBAA2Z  2 года назад

      please watch the series, this topics has been covered too ruclips.net/video/82IabW5_mao/видео.html

  • @JoshKingiu
    @JoshKingiu Год назад

    thanks

    • @VBAA2Z
      @VBAA2Z  Год назад

      You're welcome!

  • @charliefisher3676
    @charliefisher3676 3 года назад +1

    Hi when I try this code I get compile error: Label not defined and highlights “On Error GoTo ErrHndler”

    • @VBAA2Z
      @VBAA2Z  3 года назад

      you'll have to add below so the code can redirect to that section on error.
      ErrHndler:

  • @fahimmulla6673
    @fahimmulla6673 4 года назад +1

    Hi This is very helpful video. I am wondering how can we update access data bases where I have list of records in excel sheet and lets say I added more lines each and want to update that in access DB. can this be done, would be great if you can make a video. Thanks again.

    • @VBAA2Z
      @VBAA2Z  4 года назад

      Glad you found them useful. There are various ways to do this. Direct execute SQL command using your excel data as variable.
      Use .FIND method to filter our data as below show e.g. of filtering ID = valueX. All the best!
      rs.Find "ID = '" & valueX & "'"
      Please check below link for complete series. ruclips.net/p/PLo0aMPtFIFDo8ExMaRHg5nQxetGw--S0a

    • @fahimmulla6673
      @fahimmulla6673 4 года назад

      @@VBAA2Z Thanks for your reply. I managed to create access DB and directly save date. I kind of avoided using excel sheet to save record for data safety. I am right now trying to search data from excel: I managed to find the record but unable to display on the userform, any idea how can I achieve it. I get message "found record" but I am unable to show that in the text boxes on the form. the commented code did not work, any suggestions?
      cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.Path & "\Database.mdb" & ";Jet OLEDB:Database"

      'Find record set

      qry = "select * from tblcasetracker where [Case ID] ='" & Me.searchtext.Value & "'" 'original code


      rst.Open qry, cnn, adOpenKeyset, adLockOptimistic

      If rst.EOF And rst.BOF Then
      MsgBox "The Case ID does not exist", vbCritical
      Else
      MsgBox "Record found"

      'code here to read data from recordset
      'Me.Srno.Value = rst![Sr No]
      'Me.caseidtext.Value = rst![Case ID"]


      'CaseTracker.Srno.Value = .Fields("Sr No")

  • @pediexhun2282
    @pediexhun2282 2 года назад

    Thank you so much

    • @VBAA2Z
      @VBAA2Z  2 года назад

      You're most welcome

  • @stevetaylor9574
    @stevetaylor9574 5 лет назад +2

    Hey,First time viewer - just subscribed as ive found this very helpful, thanks for taking the time to create this.
    I'm trying to edit this VBA for a project i am working on - we have multiple workbooks ( per customer account ) and wish for all of these to be wrote into the same Access DB - using this video i can do that. However i also need a field populating thats not captured anywhere. Example one account Smiths Ltd - i would want the VBA code to be able to add into access "Smiths Ltd" - i realise i would have to have a slightly diff code on each workbook for this. But is this possible to add none existing data on the sheets to a table by hardcoding it into vba?

    • @VBAA2Z
      @VBAA2Z  5 лет назад +1

      Hi Steve, thanks for supporting the channel.
      try something like this:
      rs.AddNew
      rs.Fields("your field name here") = "hard coded value here"
      rs.Update
      For better exposure and to efficiency build your code go through these videos too.
      ruclips.net/video/82IabW5_mao/видео.html

  • @solaaladesanmi4605
    @solaaladesanmi4605 2 года назад

    Hello, Thank you for the video, great explanation. However, When I ran the code with all connection set, I received the following error message. "Constants, Fixed-length strings, arrays, user-defined types and Declare statements not allowed as Public members of object modules". Can you help with this error?
    Thank you

    • @VBAA2Z
      @VBAA2Z  2 года назад

      Please try in Google or Stackoverflow

    • @maeganneramos3421
      @maeganneramos3421 2 года назад

      Hi Sola, did you find any solution regarding this error? I’m also getting the same error message

  • @ajinkyaankush3648
    @ajinkyaankush3648 2 года назад +1

    Will it work if we save this Access DB on SharePoint??

    • @VBAA2Z
      @VBAA2Z  2 года назад +1

      You can access SharePoint library as drive by mapping it to local drive

  • @Fredderf0815
    @Fredderf0815 4 года назад +1

    Its really a good video. Unfortunately the link to the code is not working anymore. Could you pls update! Thx

    • @VBAA2Z
      @VBAA2Z  4 года назад

      Hi Christian, thanks for pointing that out. I have updated the video description with the link for related materials.

  • @MJLCabral
    @MJLCabral 3 года назад

    Are these files paid to download, or are they free?

    • @VBAA2Z
      @VBAA2Z  3 года назад

      Hi JCabral, thanks for watching.
      Please check the download center for more details. Full package free download is discontinued to help channel sustain however you'll find selected episodes for download.
      vbaa2z.blogspot.com/2020/12/you-can-support-vba-a2z-by-simply.html