How to create custom addins using USysRegInfo

I am tried to create add-ins for MS access. I am already long time bored during editing SQL code copying it to MS Word and using find and replace function. For implement AddIn I am trying to use USysRegInfo. But I don’t know how to use it. Can anybody tell me how can I use this and how it helpful for creating AddIn. I follow the steps to create add in as mention on Microsoft support website. But I am not able to understand. I am searching over it but found nothing related. Any help on this will be appreciated. Guys I just want demo on this or provide me any other way to do this. Any other suggestion is welcome.


  • Microsoft support website already gives the step by step procedure but if it not working for you. I will suggest to you use this query.

    SELECT USysRegInfo.ValName, USysRegInfo.Value FROM USysRegInfo WHERE (((USysRegInfo.ValName) Is Not Null)) ORDER BY USysRegInfo.ValName".
    this query fetch data from Windows Registry ( new entries are stored in it ). Before to create custom addin you have to know about USysRegInfo and subkey. For detail on this you can go through Microsoft support website.

    Well ,As your requirement on create custom addin and use it on other application, this needs you to do some coding. Since this is complex problem, and needs full MS Access Application to demonstrate this issue. Here is function to create addins.

    `Public Function SetSummaryInfoProperty(strProperty As String, strValue As String)
    'working code on'
    CurrentDb.Containers("Databases").Documents("SummaryInfo").Properties(strProperty) = strValue
    End Function
    Private Sub txtCompany_AfterUpdate()
    Call SetSummaryInfoProperty("description", Me.txtCompany)
    End Sub
    Private Sub txtTitle_AfterUpdate()
    Call SetSummaryInfoProperty("name", Me.txtTitle)
    Dim strTitle As String
    strTitle = Me.txtTitle
    If strTitle = "" Then
    Exit Sub
    End If
    Call UpdateSubkey(strTitle)
    End Sub

    Public Function UpdateSubkey(strValue As String)
    Dim strSQL As String
    Dim strSubkey As String
    strSubkey = "HKEY_CURRENT_ACCESS_PROFILE\Menu Add-ins\" & strValue
    strSQL = "UPDATE USysRegInfo SET USysRegInfo.Subkey = '" & strSubkey & "';"
    DoCmd.SetWarnings False
    DoCmd.RunSQL strSQL
    DoCmd.SetWarnings True
    End Function`

    These function working for me. And for complete solution to this problem is made available on the . The article is available under Menu “MS Access VBA >> Access Articles >> “.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion