Erwin Craps - IT Helps
Erwin.Craps at ithelps.be
Mon Aug 21 16:44:09 CDT 2006
When using me.txtdate your are refering to the control on a form. When using me!txtdate you are refering to the field from the forms recordset (rowsource). But for what concerns your error. When using me.txtDate = #1/1/2001# the code can fails depending of whats in the controlsource. If you replace the . By a ! Than you maybe have no error but you are refering tho the field instead of the control (in case a field exists with that name). -----Oorspronkelijk bericht----- Van: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] Namens John Skolits Verzonden: maandag 21 augustus 2006 21:46 Aan: 'Access Developers discussion and problem solving' Onderwerp: [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