John W. Colby
jwcolby at colbyconsulting.com
Tue Mar 23 15:41:12 CST 2004
Someone was asking the other day whether the framework could be used with an unbound form. The answer of course is yes, but the fact that a form is bound allows us to do a ton of things at the framework level that might not be possible (or easy) using an unbound form. For example the lecture I am working on now demonstrates using the framework to automatically apply date formatting to a text box control using Sysvars to turn on/off using the Framework Specified format and another SysVar to specify the format itself. In order to accomplish this, I get the recordset clone, then get the datatype of the field the control is bound to. Using this I can know when a control is displaying a date, and therefore that I need to use Sysvars to decide whether to apply a format / mask and what the format / mask should be. BTW I can do the same thing for currency, floating point numbers and anything else where you would use a format / mask for the data entry. Some things such as a zip code or a phone number would require "manual" setup anyway since there is no such datatype, it is all text. If a form is unbound, I can certainly do the same thing, however we will need a method for the control class to TELL the control that it is going to be displaying a date value. I would then have to call this setup method in the form's Open event for any control that will display a date (to set the format string) or allow the user to enter a date (to set the mask if any). Personally I hate data entry date masks but that is another story. If any of the unholy unbounders out there are watching this discussion and want to work with me to build unbound usability into the framework please contact me offline. I will even include such code in these lectures. Anyway, look for the next lecture where I demo setting date masks / formats using the SysVars. John W. Colby www.ColbyConsulting.com