John Skolits
askolits at ot.com
Mon Aug 21 15:17:59 CDT 2006
Gee, I've been doing that since version 1.0. How else do you refer to a control on the form besides using Full syntax? Froms!frmMainForm!txtDate = #1/1/2001# ? Or using a With (which uses the "." operator) With txtDate .Height = 2000 .Width = 2000 .Caption = "This is MyLabel" End With Maybe I should use me.txtDate.Value? But, I've had issues with ".value" in the past. Don't remember what the Issues were but from past experiences I've avoid using .value if I can. As you suggested, you could drop it all together and sometimes it works, but if you have a field name behind the form and a text box name with the same name, it will get confused. John -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Monday, August 21, 2006 3:58 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Bang and Dot operator in Runtimes. John, I never use the me. or me! syntax on any forms or reports to simply refer to a textbox, combobox, checkbox, label, etc. Could you just remove it altogether? Dan Waters -----Original Message----- Subject: [AccessD] Bang and Dot operator in Runtimes. I've been able to fix this by making some changes in code but want to know if anyone has additional info on why this occurs. Sometimes, referring to a text box with the "." operator sometimes fails in runtime apps. me.txtDate = #1/1/2001# 'Causes an error Vs. Me!txtDate = #1/1/2001# The error message I get is that the dot operator is invalid. I simply change it and it's fine. Yet, on other forms, it's working. I re-import and uncompile/compile many times on these apps and it still doesn't seem to always catch the potential problem. Any thoughts? John -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com