Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3433462
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:34:36+00:00 2026-05-18T07:34:36+00:00

I recently finished a class that we’re using to tie Access to some WCF

  • 0

I recently finished a class that we’re using to tie Access to some WCF Services. Of course this means that the .Net classes (and all of their properties) need to be visible to COM. Given that I’m using VB10 and the Contact class has about 20 properties I went ahead and used auto-implementing properties.

Much to my surprise, the properties were not accessible from within VBA in Access. I tried marking the properties as ComVisible (which I didn’t have to do in the past with standard properties) and it still didn’t work. After changing the auto properties to standard properties everything worked.

Public Property FirstName As String

Became

Public Property FirstName As String
    Get
        return _strFirstName
    End Get
    Set
        _strFirstName = value
    End Set
End Property

My understanding is that the two should be equivalent. According to what I’ve read on MSDN, auto-implementing properties simply take care of creating the backing field and getter / setter for you and for all intents and purposes they should be the same.

Clearly they’re not, so what else is going on behind the scenes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:34:36+00:00Added an answer on May 18, 2026 at 7:34 am

    They are. Some sample code:

    <ComVisible(True)> _
    <ClassInterface(ClassInterfaceType.AutoDual)> _
    Public Class Class1
        Private prop As Boolean
        Public Property BoolProp() As Boolean
            Get
                Return prop
            End Get
            Set(ByVal value As Boolean)
                prop = value
            End Set
        End Property
    
        Public Property BoolProp2() As Boolean
    End Class
    

    With commands:

    tlbexp ClassLibrary1.dll
    oleview ClassLibrary2.tlb

    Produces this interface dump:

    interface _Class1 : IDispatch {
        [id(00000000), propget,
          custom(54FC8F55-38DE-4703-9C4E-250351302B1C, 1)]
        HRESULT ToString([out, retval] BSTR* pRetVal);
        [id(0x60020001)]
        HRESULT Equals(
                        [in] VARIANT obj, 
                        [out, retval] VARIANT_BOOL* pRetVal);
        [id(0x60020002)]
        HRESULT GetHashCode([out, retval] long* pRetVal);
        [id(0x60020003)]
        HRESULT GetType([out, retval] _Type** pRetVal);
        [id(0x60020004), propget]
        HRESULT BoolProp([out, retval] VARIANT_BOOL* pRetVal);
        [id(0x60020004), propput]
        HRESULT BoolProp([in] VARIANT_BOOL pRetVal);
        [id(0x60020006), propget]
        HRESULT BoolProp2([out, retval] VARIANT_BOOL* pRetVal);
        [id(0x60020006), propput]
        HRESULT BoolProp2([in] VARIANT_BOOL pRetVal);
    };
    

    It’s there. You are doing something wrong, no idea what.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.