Data Check-in
Data Check-in
  • 4
  • 2 513
How to Use Google Forms with Microsoft Access
In this video, I’ll show you how to create a web form for Microsoft Access using Google Forms! Learn how to collect data online seamlessly and store it in your Access database with this 10-step guide and working solution. Perfect for anyone who loves Microsoft Access but needs a web-based form solution.
Main Points:
- Learn how to collect responses via Google Forms and automatically store them in Access.
- Get step-by-step guidance on creating a Google Cloud project, generating an API key, and writing custom VBA code to connect it all.
- See how to set up a web form, make it accessible, and process the data directly in Microsoft Access.
Note: This simple 10-step guide shows how to integrate Google Forms with Microsoft Access effectively. Security is vital but not covered here, allowing you to prioritize functionality and adapt it later for your needs.
👉 Get the Complete 10-Step Guide with Code: Access the exact code and setup guide featured in this video for just $2 USD. Available now on Etsy: datacheckin.etsy.com/listing/1858356909/10-step-guide-plug-and-play-solution
Thank you for visiting Data Check-in! Your trusted resource for all things data-covering Microsoft Access, Excel, VBA, Google integrations, and much more.
Subscribe:
Stay updated with the latest videos on data management and automation! From Microsoft Access, Excel, and VBA to Python, SQL, and Google tools-we cover it all. Don’t forget to like, share, and subscribe to support our channel and never miss a new tip or tutorial!
Переглядів: 237

Відео

Microsoft Access Version Control
Переглядів 2286 місяців тому
Take control of Version Control for your Microsoft Access databases! Main Points: - In 15 minutes learn to implement Version Control for multiple users and Microsoft Access files. - Refer to Top comments for Objects and VBA code used in video. Buy the Code: - Working Code presented in video available on Etsy: www.etsy.com/listing/1762171237/microsoft-access-version-control-code Thank you for ch...
How to Customize Microsoft Access Ribbon
Переглядів 1,8 тис.Рік тому
Today we discover how to make the Microsoft Access Ribbon look like Your Application; Not Access. Get rid of that Ribbon! It is scary stuff! Teach your users to use Your application Not Access. Main Points: - In under 5 minutes learn to Customize the Ribbon in Microsoft Access. - Refer to Top comments for VBA code and XML Code used in video. Buy the Code: - Working Code presented in video avail...
Access is Not dead!
Переглядів 311Рік тому
Data Check-in is dedicated to Design, Make and Educate for all things Microsoft Access, Excel and VBA further proving Access is not dead! Come see how Alive Access can be :-)

КОМЕНТАРІ

  • @shadow9449
    @shadow9449 6 днів тому

    The idea seems like it has a lot of potential! I watched the video and tried following along but really didn't get past step 1. I installed python so I can type the command in the video to start the server but it said that I didn't have Python installed so I must have gone wrong somewhere. To be honest, I don't know what a loopback redirect server is and Google wasn't very helpful. I watched the video trying to follow the other steps in Google cloud console but to me as an Access developer, it looked like a lot of places to click and I did not understand what I was doing or why. I realize that a complete explanation of all the steps would require a far longer video but it might be helpful to a lot of Access developers to have some prerequisite information or resources to watch or read so we can read up on the background of what is going on to make the information more useable. I appreciate the information and anyone who can find ways to integrate Access with today's modern programming world is a huge help. I am sure that there are many developers who will be able to benefit from this but to those of us who are Access-only developers, there seems to be a big learning curve (which I'd be willing to do if I knew where to start) in order to be able to implement this integration.

    • @accessisnotdead
      @accessisnotdead 6 днів тому

      @shadow9449 ❤ This comment is incredibly helpful! How about I publish 3 videos focused on "How to setup a loop back redirect url" as well as "What is a loop back url?" and How to Install/Use Python for beginners. Would that be helpful?

    • @shadow9449
      @shadow9449 6 днів тому

      @@accessisnotdead That would be VERY helpful! A full Python developer course is most likely outside of scope for this channel, but enough Python introduction to get Access developers up and running with what is being taught in this video would make a huge difference. In the same vein, while it would take many hours (and not really help much) to create a full tutorial on Google Cloud Console, a brief overview that introduces Access Developers to the console and explains what you are doing in steps 2-5 would dispel the mystery of what we are watching in and be very useful in close to half of this video as well as open further opportunities to making videos on further topics that involve integrating Google services with Access. Your response got a like and subscribe from me! Thanks once again for for your work 😃

    • @accessisnotdead
      @accessisnotdead 6 днів тому

      @@shadow9449 Awesome. I will be thinking about how to approach the Google Cloud Console video. I understand the need. Thank you so much for taking the time to comment with such helpful information to make it what you need!

  • @accessisnotdead
    @accessisnotdead 8 днів тому

    👉 Get the Complete 10-Step Guide with Code: Access the exact code and setup guide featured in this video for just $2 USD. Available now on Etsy: www.etsy.com/listing/1858356909/10-step-guide-plug-and-play-solution?etsrc=sdt

  • @zchenmike
    @zchenmike 9 днів тому

    This is nice!

  • @accessisnotdead
    @accessisnotdead 10 днів тому

    Type the following commands into the command prompt: Cd C:/TempServer Then Start the server by entering python -m http.server 8080

  • @accessisnotdead
    @accessisnotdead 10 днів тому

    In Access, add Module named “GoogleOAuthWithLoopback” Option Compare Database Option Explicit ' Your API key Const apiKey As String = "PASTE_API_KEY_HERE" ' Function to retrieve data from Google Sheets using API key Public Function GetGoogleSheetData(apiKey As String, sheetId As String, range As String) As String Dim http As Object Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0") Dim url As String url = "sheets.googleapis.com/v4/spreadsheets/" & sheetId & "/values/" & range & "?key=" & apiKey http.Open "GET", url, False http.send If http.Status = 200 Then GetGoogleSheetData = http.responseText Else MsgBox "Error: " & http.Status & " - " & http.statusText, vbCritical GetGoogleSheetData = "" End If Set http = Nothing End Function ' Function to load data into a specified table Public Sub LoadDataIntoTable(jsonResponse As String, tableName As String) Dim db As DAO.Database Dim rs As DAO.Recordset Dim jsonObject As Object Dim jsonArray As Object Dim fieldNames() As String Dim i As Integer Dim j As Integer Dim tdf As DAO.TableDef Dim fieldName As String Dim fieldCount As Integer Set db = CurrentDb ' Parse the JSON response Set jsonObject = JsonConverter.ParseJson(jsonResponse) 13 Set jsonArray = jsonObject("values") ' Get the number of fields (columns) in the first row of the sheet fieldCount = jsonArray(1).Count ReDim fieldNames(1 To fieldCount) ' Store header names in the fieldNames array For i = 1 To fieldCount fieldNames(i) = jsonArray(1)(i) Next i ' Attempt to clear the table contents instead of deleting the table On Error Resume Next db.Execute "DELETE FROM " & tableName, dbFailOnError On Error GoTo 0 ' Check if table exists and if not, create it If Not TableExists(tableName) Then ' Create a new table definition for the specified table Set tdf = db.CreateTableDef(tableName) For j = 1 To fieldCount fieldName = fieldNames(j) ' Headers start from index 1 in jsonArray tdf.Fields.Append tdf.CreateField(fieldName, dbText) Next j db.TableDefs.Append tdf End If ' Open the table and insert data Set rs = db.OpenRecordset(tableName, dbOpenDynaset) ' Insert data starting from the second row (first row is headers) For i = 2 To jsonArray.Count rs.AddNew For j = 1 To fieldCount rs(fieldNames(j)) = jsonArray(i)(j) Next j rs.Update Next i ' Clean up rs.Close Set rs = Nothing Set db = Nothing MsgBox "Data has been successfully loaded into " & tableName & ".", vbInformation End Sub ' Example usage in data fetching Public Function FetchDataFromGoogleSheet(sheetId As String, 14 range As String, tableName As String) Dim jsonResponse As String jsonResponse = GetGoogleSheetData(apiKey, sheetId, range) If jsonResponse <> "" Then LoadDataIntoTable jsonResponse, tableName End If End Function Public Sub DeleteTable(tableName As String) Dim db As DAO.Database Set db = CurrentDb On Error Resume Next ' Ignore error if table doesn't exist db.TableDefs.Delete tableName db.TableDefs.Refresh ' Ensure the deletion is recognized On Error GoTo 0 ' Resume normal error handling End Sub Public Function TableExists(tableName As String) As Boolean Dim db As DAO.Database Dim tdf As DAO.TableDef Set db = CurrentDb TableExists = False For Each tdf In db.TableDefs If tdf.Name = tableName Then TableExists = True Exit Function End If Next tdf End Function

  • @accessisnotdead
    @accessisnotdead 10 днів тому

    In Access, add Module1: Option Compare Database Public Function ExampleUsage() Dim sheetId As String Dim range As String Dim tableName As String ' Set the parameters sheetId = " PASTE_SHEET_ID_HERE " range = "A1:C4" tableName = "tblVideos" ' Call the function to fetch data and load it into the specified table FetchDataFromGoogleSheet sheetId, range, tableName End Function

  • @accessisnotdead
    @accessisnotdead 10 днів тому

    For the JSON code: This code is not my code, so I will direct you how to get it. Go to: github.com/VBA-tools/VBA-JSON

  • @bumpersmith
    @bumpersmith 5 місяців тому

    I like the direction you are going but Please do not use dark mode.

    • @accessisnotdead
      @accessisnotdead 5 місяців тому

      Hey @bumpersmith I really appreciate the heads-up that I had dark mode on! Yikes! Next video you can expect that not to happen ;-) Thank you again!

  • @vincentchikobe649
    @vincentchikobe649 5 місяців тому

    That was I really enjoyed it good tutor God bless.Just learning access at 45yrs

    • @accessisnotdead
      @accessisnotdead 5 місяців тому

      @vincentchikobe649 welcome to the Access family! We are all life long learners so never too late. On the horizon are plans to show how to integrate Google Forms and Sheets with Access, so there is so much you can do with Access! Stay tuned!

    • @bumpersmith
      @bumpersmith 5 місяців тому

      @@accessisnotdead looking forward to that. Google forms and sheets with Access.

    • @accessisnotdead
      @accessisnotdead 6 днів тому

      @vincentchikobe649 Google forms with Access has been published! ua-cam.com/video/equTtWnKEWY/v-deo.htmlfeature=shared

  • @SLeinert
    @SLeinert 5 місяців тому

    Thank you very much for that video! It was a great start and motivation to learn more about how to customize that ribbon. Nice and detailed enough to get started for own projects 👍 thanks!! Now only custom „context menu“ are missing 😅 maybe i will also give it a try again… 😉

    • @accessisnotdead
      @accessisnotdead 5 місяців тому

      Great idea for another video! How to customize the right click menu. Be sure to subscribe to be alerted of new videos.

    • @SLeinert
      @SLeinert 5 місяців тому

      @@accessisnotdead that would be great 😀 subscribe? … already done 😉 your Video was a good inspiration for the start!! Thank you 👍

  • @ferreira845
    @ferreira845 6 місяців тому

    Kelly!!❤❤🎉😊

  • @accessisnotdead
    @accessisnotdead 6 місяців тому

    Access files: VersionManager.accdb ServiceRequests.accdb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Objects in VersionManager.accdb: Form: frmVersionUpdateMessage Module: modVersionManager ---------------------------------------- Form Objects: frmVersionUpdateMessage txtAlert = controlsource="No Database Value was provided. Close and reopen your Database to check for a new version." txtCaption = controlsource ="There is a new version available for: " & [txtFromDBName] txtFromDBName (hidden) txtFromDBPath(hidden) txtToDBName(hidden) txtToDBPath(hidden) btnUpdate Form Code: Option Compare Database Private Sub btnUpdate_Click() modVersionManager.VersionUpdate End Sub Private Sub txtFromDBName_AfterUpdate() If IsNull(Me.txtFromDBName.Value) = False Then txtCaption.Visible = True txtAlert.Visible = False Else txtCaption.Visible = False txtAlert.Visible = True End If End Sub

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Module Code: modVersionManager Option Compare Database Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal lngMilliSeconds As Long) Public Function VersionUpdate() Dim strFromDBName As String, strFromDBPath As String If IsNull(Form_frmVersionUpdateMessage.txtFromDBName.Value) = False Then strFromDBName = Form_frmVersionUpdateMessage.txtFromDBName.Value Else MsgBox "Error. Contact your administrator. Database Name value was not passed." Exit Function End If If IsNull(Form_frmVersionUpdateMessage.txtFromDBPath.Value) = False Then strFromDBPath = Form_frmVersionUpdateMessage.txtFromDBPath.Value Else MsgBox "Error. Contact your administrator. Database Path value was not passed." Exit Function End If Dim strToDBName As String, strToDBPath As String If IsNull(Form_frmVersionUpdateMessage.txtToDBName.Value) = False Then strToDBName = Form_frmVersionUpdateMessage.txtToDBName.Value Else MsgBox "Error. Contact your administrator. Database Name value was not passed." Exit Function End If If IsNull(Form_frmVersionUpdateMessage.txtToDBPath.Value) = False Then strToDBPath = Form_frmVersionUpdateMessage.txtToDBPath.Value Else MsgBox "Error. Contact your administrator. Database Path value was not passed." Exit Function End If Dim strFromFullPath As String, strToFullPath As String strFromFullPath = strFromDBPath & strFromDBName strToFullPath = strToDBPath & strToDBName DoCmd.Hourglass True MsgBox "The Database will now update. This may take a few minutes.", vbInformation, "Processing" FileCopy strFromFullPath, strToFullPath MsgBox "Database Updated. Database will now open.", vbInformation, "Success" Dim appAccess As Access.Application Set appAccess = CreateObject("Access.Application") appAccess.OpenCurrentDatabase strToFullPath appAccess.Visible = True appAccess.UserControl = True appAccess.RunCommand acCmdAppMaximize Set appAccess = Nothing Application.Quit DoCmd.Hourglass False End Function

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Objects in ServiceRequests.accdb: Table: tblVersion Form: frmVersionUpdate Module: modVersionControl Macro: AutoExec Macro: macVersionShowCurrentVersion ---------------------------------------- Table Objects: tblVersion Field: VersionID (Number) Primary Key Field: VersionNo (Short Text) Only 1 record should exist. Version ID will always be 1. ---------------------------------------- Form Objects: frmVersionUpdate Record Source = SELECT tblVersion.VersionNo FROM tblVersion WHERE (((tblVersion.VersionID)=1)); Add field VersionNo to form Add button btnSetVersion ---------------------------------------- Form Code: frmVersionUpdate Option Compare Database Private Sub btnSetVersion_Click() Dim strVersionNo As String strVersionNo = CStr(Me.VersionNo.Value) SetVersion (strVersionNo) MsgBox "Version Updated to " & strVersionNo, vbInformation, "Success!" DoCmd.Close acForm, "frmVersionUpdate", acSaveYes End Sub

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      ---------------------------------------- Module Code: modVersionControl Option Compare Database Option Explicit ' Define constants for the database path and name Public Const strFromFPath As String = "G:\My Drive\MyNetworkFolder\" Public Const strFromFName As String = "ServiceRequests.accde" Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Public Function bFileExists(strFullPath As String) As Boolean Dim fs As Object Set fs = CreateObject("Scripting.FileSystemObject") bFileExists = fs.FileExists(strFullPath) Set fs = Nothing End Function Public Function bFolderExists(strFullPath As String) As Boolean Dim fs As Object bFolderExists = False Set fs = CreateObject("Scripting.FileSystemObject") bFolderExists = fs.FolderExists(strFullPath) Set fs = Nothing End Function

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Public Function AtStartCheckVersion() If Left(Application.CurrentProject.Name, 5) = "ADMIN" Then 'Do Nothing MsgBox "Opening as Admin", vbInformation, "Admin Access" Else If bFolderExists(strFromFPath) = False Then MsgBox "Folder cannot be found. Must be able to access the following folder in Windows Explorer to run database: " & strFromFPath DoCmd.RunCommand acCmdExit Exit Function End If If bFileExists(strFromFPath & strFromFName) = False Then MsgBox "File cannot be found. Must be able to access the following file in Windows Explorer to run database: " & strFromFPath & strFromFName DoCmd.RunCommand acCmdExit End If Dim strToFPath As String, strToFName As String strToFPath = Replace(CurrentDb.Name, Application.CurrentProject.Name, "") strToFName = Application.CurrentProject.Name 'Is there a new version available? Dim strVersion As String, strCurrentVersion As String strVersion = GetVersion(strFromFPath, strFromFName) strCurrentVersion = GetCurrentVersion If strCurrentVersion = strVersion Then 'Do Nothing Else 'Check if version control file exists If bFileExists(strToFPath & "VersionManager.accde") = False Then MsgBox "File cannot be found. The version control file must be located in the following path: " & strToFPath & "VersionManager.accde" DoCmd.RunCommand acCmdExit Exit Function End If End If If strCurrentVersion <> strVersion Then MsgBox "A new version is available. The database must close to update." DoCmd.Hourglass True Dim appAccess As Access.Application Set appAccess = CreateObject("Access.Application") appAccess.OpenCurrentDatabase strToFPath & "VersionManager.accde", False appAccess.Forms!frmVersionUpdateMessage!txtFocus.SetFocus appAccess.Forms!frmVersionUpdateMessage!txtFromDBName.Value = strFromFName appAccess.Forms!frmVersionUpdateMessage!txtFromDBPath.Value = strFromFPath appAccess.Forms!frmVersionUpdateMessage!txtToDBName.Value = strToFName appAccess.Forms!frmVersionUpdateMessage!txtToDBPath.Value = strToFPath appAccess.Forms!frmVersionUpdateMessage!txtAlert.Visible = False appAccess.Forms!frmVersionUpdateMessage!txtCaption.Visible = True appAccess.Forms!frmVersionUpdateMessage!btnUpdate.Visible = True appAccess.Visible = True appAccess.UserControl = True appAccess.RunCommand acCmdAppMaximize Set appAccess = Nothing Application.Quit End If End If Exit Function End Function

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Public Function GetCurrentVersion() As String Dim prop As DAO.Property Dim dbs As DAO.Database On Error Resume Next Set dbs = CurrentDb 'Set the property's value 'If it doesn't exist, an error 3270 "Property not found" will occur GetCurrentVersion = dbs.Containers("Databases")("UserDefined").Properties("Version").Value dbs.Close 'Clean up Set prop = Nothing Set dbs = Nothing End Function Public Function GetVersion(strFromFPath As String, strFromFName As String) As String Dim prop As DAO.Property Dim dbs As DAO.Database On Error Resume Next Set dbs = OpenDatabase(strFromFPath & strFromFName, , True) 'Set the property's value 'If it doesn't exist, an error 3270 "Property not found" will occur GetVersion = dbs.Containers("Databases")("UserDefined").Properties("Version").Value dbs.Close 'Clean up Set prop = Nothing Set dbs = Nothing End Function Public Sub SetVersion(strVersion As String) Dim prop As DAO.Property Dim dbs As DAO.Database On Error Resume Next Set dbs = CurrentDb 'Set the property's value 'If it doesn't exist, an error 3270 "Property not found" will occur dbs.Containers("Databases")("UserDefined").Properties("Version") = strVersion If Err <> 0 Then 'If the property doesn't exist, create it Set prop = dbs.CreateProperty("Version", dbText, strVersion) 'Append it to the collection dbs.Containers("Databases")("UserDefined").Properties.Append prop End If 'Now read the property Debug.Print dbs.Containers("Databases")("UserDefined").Properties("Version") 'Clean up Set prop = Nothing Set dbs = Nothing End Sub Function strGetDBName() As String strGetDBName = Application.CurrentProject.Name End Function

  • @Aki-ht6vh
    @Aki-ht6vh 6 місяців тому

    Hi mam. I want to use unbound text box in a continuous form that displays month(datefield) . How to bring dynamic values in each record instead of same value in all record without using control source property because control source properry make such unbound text box non editable. I am interested in using after update event to such text box to change value in underlying datefield.

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      What if instead of unbound you used the control source for the field you want to update, and then use the default value that would update to the month(field) value. Thru VBA it could update via the on form load or after a field or record update etc. You would have to include some If statements

  • @coyote10
    @coyote10 7 місяців тому

    Do you have a blog or website?

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Hi @coyote10 No blog as of yet. We do have a website datacheckin.com which is undergoing a rebranding. New videos in the works. Stay tuned.

    • @accessisnotdead
      @accessisnotdead 6 днів тому

      @coyote10 I am debating on starting a blog. Wanted to know your opinion on why it would be useful to you, so I can create something people would benefit from.

  • @md.omerkhayyam3343
    @md.omerkhayyam3343 7 місяців тому

    what could be reason ms access form wizard cannot find the table (USysRibbonImages) ?

    • @accessisnotdead
      @accessisnotdead 6 місяців тому

      Hi @md.omerkhayyam3343 If your options to hide System tables is on then USysRibbonImages will be hidden.

  • @44louix
    @44louix Рік тому

    HI, thats so cool, would you mind sharing some template with us or any site where i can get some template 🙂

    • @accessisnotdead
      @accessisnotdead Рік тому

      Hi @44louix The below link from Microsoft will give you a breakdown of all the different types of XML tags you can use for different menu options. A Template would only be useful if it was for a specific type of application that had common commands, but you are really going to want to customize the menu to what makes sense for your application. learn.microsoft.com/en-us/openspecs/office_standards/ms-customui/700e4451-8706-40c5-8d7b-896e4ae21b69

    • @44louix
      @44louix Рік тому

      @@accessisnotdead Thanks dear You are the best Love you

  • @johnclark851
    @johnclark851 Рік тому

    Like Nifty, the ribbon was always a "black box" for me. I like your format and you succinct way of explaining things - not bad for a Crazy Cat Lady!

    • @accessisnotdead
      @accessisnotdead Рік тому

      @johnclark851 You know it! LOL I figure why not let the cats have a debut :-) Thank you for the compliment on the format. Always open to suggestions to make it easier for all.

  • @NiftyAccessMicrosoft
    @NiftyAccessMicrosoft Рік тому

    Excellent video thank you. I have never tackled the ribbon myself, always avoided it because it just looked a very complicated process. But now with your instructions, I feel confident I can easily create my own ribbon!

    • @accessisnotdead
      @accessisnotdead Рік тому

      @NiftyAccessMicrosoft That comment alone makes all the hard work creating the video worth it! The thing to watch out for is how sensitive the XML code is. Recommend using Notepad++ for editing. Feel free to reply on here if you run into any issues. Happy coding!

  • @diomaksolutions
    @diomaksolutions Рік тому

    Nice presentation....awesome!

    • @accessisnotdead
      @accessisnotdead Рік тому

      If you have any questions or get stuck on anything let me know. It can take some practice editing the Ribbon.

    • @44louix
      @44louix Рік тому

      @@accessisnotdead Honestly, with your short videos, it's like i have done the practice and i already create 2 tabs with several menus inside, i learned the basic, and now i can do whatever i want, thanks

    • @accessisnotdead
      @accessisnotdead Рік тому

      @@44louix Woohoo!!!! Go @44louix!

  • @joshua4915
    @joshua4915 Рік тому

    *Promo sm* 😴

    • @accessisnotdead
      @accessisnotdead Рік тому

      Hi. No need to buy anything or subscribe. All the code included in the comments and shown in the video will get you a working custom Ribbon in Access. The Etsy link is incase you do not want to go thru the UA-cam tutorial. A $2 shortcut for you but not necessary. I'll be sure to be more clear in future videos. Thank you for the feedback!

    • @accessisnotdead
      @accessisnotdead Рік тому

      @joshua4915 I would love to hear your opinion on what made you think the video was a promo. Your opinion matters and helps us to create more helpful videos.

  • @accessisnotdead
    @accessisnotdead Рік тому

    '''''''''''COPY AND PASTE INTO A NEW MODULE NAMED: modUSysRibbons ' '************************************************************************************* '1.) Module name: modUSysRibbons. '2.) Go to Tools-->References and check Microsoft Office 16.0 Object Library '3.) Create Tables: 'Table Name: USysRibbons 'Fields: 'ID AutoNumber 'RibbonName Short Text 'RibbonXml Long Text 'Comments Short Text 'Table Name: USysRibbonsImages 'ControlId Short Text 'Images Attachment 'Description Short Text '4.) Form Name: frmUSysRibbonsImages '5.) Create Macro: macOpenOrders '6.) Refer to next comment for XML code for Table USysRibbons 'Access is Alive! 'ua-cam.com/channels/F1tGDa9oHe-0zD639mNWZw.html '************************************************************************************* Option Compare Database Option Explicit Public MyRibbon As IRibbonUI Sub OnLoadRibbon(ribbon As IRibbonUI) Set MyRibbon = ribbon End Sub Public Sub getRibbonImages(control As IRibbonControl, ByRef image) Dim attach As Attachment DoCmd.OpenForm "frmUSysRibbonsImages", acNormal, , , , acHidden '************************************************************************************* 'UPDATE TO BUTTON NAME AND IMAGE NAME bSetRibbonImage control, image, "btnOrders", "Orders" 'Example where the Button name is in the XML Code: <button id="btnOrders" 'Example where the Image name is in the Table: USysRibbonsImages IMAGE CONTROL ID '************************************************************************************* DoCmd.Close acForm, "frmUSysRibbonsImages", acSaveYes End Sub Public Function bSetRibbonImage(objRibbon As IRibbonControl, ByRef image, strControlID As String, strImageName As String) If objRibbon.CHANGETHISTOID = strControlID Then Forms("frmUSysRibbonsImages").Filter = "([USysRibbonsImages].[ControlId]='" & strImageName & "')" Forms("frmUSysRibbonsImages").FilterOn = True Dim attach As Attachment Set attach = Forms("frmUSysRibbonsImages").Controls.Item("Images") Set image = attach.PictureDisp() End If End Function

  • @accessisnotdead
    @accessisnotdead Рік тому

    <?xml version="1.0" encoding="utf-8"?> <customUI xmlns="schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoadRibbon" loadImage="OnLoadImage"> <ribbon startFromScratch="true"> <tabs> <tab id="tabOrders" label="Order Management"> <group id="grpOrders" label="Orders"> <button id="btnOrders" label="Orders" onAction="macOpenOrders" getImage="getRibbonImages" size="large"/> </group> </tab> </tabs> </ribbon> </customUI>