Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2004, 04:37 AM
Authorized User
 
Join Date: Feb 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create year in combo box..Help please!!

Hi,
:( I need help ...thanks in advance.
I want to make a year using combo box where it will show the year from 2001 -2005, but how to make the year flexsible.
for example:
if user choose the year of 2004,in the combo box it will show the year from 2000,2001,2002,2003,2004,and 2005.later on if user chosse year 2003, in the combo box will be show 1999,2000,2001,2002,2003,and 2004.
the calculation will be 4 years back and 1 year ahead.

any kind of help appriciate,
thanks

 
Old July 15th, 2004, 05:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Shopgirl,

This is the first time I am coming across such a requirement. Just curious to know what for this kind of display being used.

Let me give the logic to do that, not the code at first. If you find anything difficult then you can post here anytime.;)

1) First initiate a Variable that is Empty initially.
2) Check if that variable is Empty and Fill the combo box with 2001-2005
3) On selection of any value from the Combo box, Update the page URL with the selected Value as Querystring. On top of that Page along with STEP-1, request this Query String and assign it to that Variable.
4) Now this time, if the variable is not Empty, then Run a for loop from Variable's Value-3 to Value+1 that fills the Combo box.

Hope that explains.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 15th, 2004, 09:15 PM
Authorized User
 
Join Date: Feb 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Vijay G....

Thanks for your replay..I got it.
actually this combo box I will use later on for few my crystal report in the web for my parameter.

thank's Vijay G








Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a text box from a combo box value dnf999 Access VBA 7 February 6th, 2012 02:24 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.