Charlotte Foust
cfoust at infostatsystems.com
Wed Jun 22 19:25:02 CDT 2005
The dot works fine until you try and access the columns collection of the combobox object. The syntax just gets Access 2000 and later confused, since it is seeing the combobox as a property of the form rather than a member of a collection. This is one of those increasingly rare cases where you really do need the bang. Of course, when you get to .Net, there *is* no bang .... <VBG> Charlotte Foust -----Original Message----- From: Joe Hecht [mailto:jmhecht at earthlink.net] Sent: Wednesday, June 22, 2005 5:02 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Good Code Bad Code Question Kevin wins. Need more bangs and less dots. Joe Hecht Los Angeles CA -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kevin Bachmeier Sent: Wednesday, June 22, 2005 11:25 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Good Code Bad Code Question Try using the '!' instead of the '.' for the control reference: Me!txtCost.Value = Me!cboPartNum.Column(2) Versus: Me.txtCost.Value = Me.cboPartNum.Column(2) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht Sent: Wednesday, June 22, 2005 1:01 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Good Code Bad Code Question The following line of code works correctly Me.txtCost.Value = Me.cboPartNum.Column(2) When I try to compile the code I get an error message that .cboPartNum Method or Data member not found. Any Idea what is up? Option Explicit is set Thanks Joe Hecht Los Angeles CA -- 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com