Heenan, Lambert
Lambert.Heenan at aig.com
Mon Jun 12 08:16:10 CDT 2006
Sorry. But I'd say it's a silly class. You might as well try to teach people how to code in "Basic Basic" by pointing out how Goto can be used to circumventing the carefully design flow of a execution that loop structures provide. You can Goto out of a While loop, but it's not advisable if you want maintainable code. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, June 09, 2006 5:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections Par t1. This is a simplified class, Lambert. In fact, any public variable in a class is a property of the class. You just can't control the usage of that property. I'm sure Drew will get to the "proper" approach later. ;o} Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, June 09, 2006 2:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections Par t1. <snip> Our table has three fields, so we'll create three easy properties, and a fourth which will be derived. So, in the code page type the following under the 'Option Compare Database' line: Public ID As Long Public FirstName As String Public LastName As String [ These are not properties at all, they are class member fields, and making them public is a Q&D solution which defeats the purpose of data encapsulation that classes offer. A real property Get and Set pair would correct this, with the member fields being change to Private] Lambert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com