1 year ago

#273086

test-img

Bert1974

How to create a ControlSource ms-access property in c++ without VB6

I'm trying to create a MFC ActiveX control with Visual Studio 2022, that should have a ControlSource property under Data Category when inserted in ms-access form. So that it would be possible to bind that property within ms-access.

I found following VB6-code on internet but i have no clue how to implement this with modern c++. MemberInfo, VB_ProcData and VB_MemberFlags and VB_UserMemId seem to be the important part for what i need.

Does anyone know if it's currently possible to create such property, and how that would be done?

in c++ or .net visual basic or c#? Or knows any documentation links for VB_ProcData and such?

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,
Public Property Get DataString() As String
Attribute DataString.VB_Description = "Data to be encoded to QR Code"
Attribute DataString.VB_ProcData.VB_Invoke_Property = ";Data"
Attribute DataString.VB_UserMemId = 0
Attribute DataString.VB_MemberFlags = "224"
    DataString = m_DataString
End Property

Public Property Let DataString(ByVal New_DataString As String)
    m_DataString = New_DataString
End Property

source: Making QRCode ActiveX Control for MS Access: Control Source Property

The following setup seems to work: win10-64+office2007+visual studio 6.

For now I'm going to embed my vs2019-c++ ActiveX control in a UserControl in visual studio 6-ocx, and create events/properties where needed. Of course I would prefer 1 ocx, but integration in access is much more important.

Still I'm looking for a way to do that with vs2019, and any help would be appreciated.

c++

ms-access

mfc

vb6-migration

activexobject

0 Answers

Your Answer

Accepted video resources