S
Sreedhar
Hi everyone!
Can somebody please tell me how to handle nulls with class objects ? Here is
a brief description.
Code behind a Form (btn):
With Customer
.CustomerID = Me.CustomerID
.FirstName = Me.FirstName
.MiddleName = Me.MiddleName
.LastName = Me.LastName
.AddCustomer
End With
In the above code,
--> I'm trying to add a customer through a Form.
--> 'Customer' is a class object.
--> 'AddCustomer' is a method that updates the fields 'CustomerID',
'FirstName' and 'LastName' (properties) to the 'tblCustomer' in the BE.
--> The problem is when one of the fields is a Null (eg. MiddleName).
The Class Property is declared as a string and failing when passed a Null.
Thanks in advance.
Can somebody please tell me how to handle nulls with class objects ? Here is
a brief description.
Code behind a Form (btn):
With Customer
.CustomerID = Me.CustomerID
.FirstName = Me.FirstName
.MiddleName = Me.MiddleName
.LastName = Me.LastName
.AddCustomer
End With
In the above code,
--> I'm trying to add a customer through a Form.
--> 'Customer' is a class object.
--> 'AddCustomer' is a method that updates the fields 'CustomerID',
'FirstName' and 'LastName' (properties) to the 'tblCustomer' in the BE.
--> The problem is when one of the fields is a Null (eg. MiddleName).
The Class Property is declared as a string and failing when passed a Null.
Thanks in advance.