I coded a simple example of a base class and child class. The base class has one filed and the Let and Get "dummy" properties to maintain it. The implementation of the Let and Get properties are coded in the child class.
The problem is that the child properties are not being executed. Instead, the parent properties are executed.
Here is more detail
I have a base class "clsSimple" that defines Private CustomerName as String.
In the base class I coded (abbreviated below):
Private Property Get CustomerName()
Private Property Let CustomerName()
The child class is an Access form with a button.
In the child class I coded (abbreviated):
Private Property Get clsSimple_CustomerName()
Private Property Let clsSimple_CustomerName()
Private Sub aButton_Click()
Dim objSim As clsSimple
Set objSim = New clsSimple
objSim.CustomerName = "George"
Set objSim = Nothing
My expectation was that when aButton_Click() is executed, the statement objSim.CustomerName = "George" would execute the Set property of the child class, it being the implementation of the parent property.
Instead, the Set property of the base class is being executed.
Where have I gone wrong?