sconly
06-04-2014, 09:34 AM
I would very much appreciate it if someone could help me with converting the VB 2010 code below to Access 2010 VBA
Public Class CustomerList
Private mCustName As String
Private mCustID As Integer
Public Sub New(ByVal pText As String, ByVal pValue As Integer)
mCustName = pText
mCustID = pValue
End Sub
Public ReadOnly Property CustName() As String
Get
Return mCustName
End Get
End Property
Public ReadOnly Property CustID() As Integer
Get
Return mCustID
End Get
End Property
Public Overrides Function ToString() As String
Return mCustName
End Function
End Class
What it does, in VB 2010, is store the customer name and ID so that when the customer name is selected in a combobox you can use the CustomerID to pass to a SQL stored procedure.
Thanks
Public Class CustomerList
Private mCustName As String
Private mCustID As Integer
Public Sub New(ByVal pText As String, ByVal pValue As Integer)
mCustName = pText
mCustID = pValue
End Sub
Public ReadOnly Property CustName() As String
Get
Return mCustName
End Get
End Property
Public ReadOnly Property CustID() As Integer
Get
Return mCustID
End Get
End Property
Public Overrides Function ToString() As String
Return mCustName
End Function
End Class
What it does, in VB 2010, is store the customer name and ID so that when the customer name is selected in a combobox you can use the CustomerID to pass to a SQL stored procedure.
Thanks