JWColby
jwcolby at colbyconsulting.com
Wed Sep 13 11:12:27 CDT 2006
I am setting the default value of the combo. Changing the default value of the combo changes the result seen as the form opens so I suspect that code is not modifying this at run time. The fact that it works correctly for you makes me suspicious of my form though, for sure. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Wednesday, September 13, 2006 11:41 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Combo default value strange John, Are you using code to plug in the 'ordinal value', or just setting the default value in the property sheet? When I tested this, using your value list as the data source for a combo it works exactly as you would want it to: 2 => Current Month, 3=> Current Quarter, 4 => Current Year, etc. This works whether I use the Default Value property, or run code to assign a value (in the Current Event for example). Code wise all I'm doing is "ComboControl = NumericValue". That's with a two column combo and column widths of 0";3", bound to column 1 - in other words totally standard stuff. If this is not working out for you then I'm inclined to suspect a corrupt form. Decompile? Rebuild the form? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Wednesday, September 13, 2006 10:02 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Combo default value strange I use a highly modified version of Julie Schwalm's date picker code. I use a combo instead of the radio button group that she used and added a bunch of new possibilities. The combo I use to select the date range I want has a row source type of "Value list" and a row source of: 1;Include All Dates;12;Custom Date Range;14;Current Week;2;Current Month;3;Current Quarter;4;Current Year;5;Month To Date;6;Quarter To Date;7;Year To Date;15;Last Week;8;Last Month;9;Last Quarter;10;Last Year;11;Last 12 Months;13;Today;16;Yesterday In my time tracking / billing database I want to open a time data entry form to filter to today. If I put a default value of 1 in the combo (the "ordinal value" for "Include all dates"), I get the correct thing, "include all dates". If I put 2 in there, I get "CURRENT WEEK", which is wrong, it should select "CURRENT MONTH". IOW, the integer value should select the text immediately AFTER the integer value (in the value list string), but seems to be selecting the value immediately BEFORE the integer value. Any thoughts on this? John W. Colby Colby Consulting www.ColbyConsulting.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