irresistible007
Board Regular
- Joined
- Nov 24, 2005
- Messages
- 173
Okie... i am trying to polish my skills before i shall go ahead wid the project... here is the imaginery scenario...
Objective:To build a user interface capable of adding and deleting Country Names and their respective City Names.
Description:
A little program is being Built to store customer's Data. Since the company is having worldwide network of customers we have placed two Combo boxes one for each Country and City Name so as the user can select instead of typing it everytime. However a provision to edit the country and Cities list is necessary so there is a dedicated space allocated for this task where I have putted following controls:
Controls:
2 Text Boxes...1 Each for typing Country and City Names
2 List Boxes... 1 for showing Countries and 1 for showing the respective cities for the selected Country
4 Command Buttons ... 2 set of Add & remove
Problem:
Since i am a newbie, i am totally confused as how this sub-category thingy has to be done... I mean for instance if i have to add U.S.A. its pretty easy to type following block of code
Private Sub commandbutton1_Click()
Listbox1.additem textbox1.text
End Sub
But what if i want to add washigton cuz that has to be added as a sub iem of U.S.A i.e. only to be shown when U.S.A is selected... though i can simply add a huge block of If-Then but that will only work for preset items and if the user want to add another city then I will have to alter the If-Then block again
Objective:To build a user interface capable of adding and deleting Country Names and their respective City Names.
Description:
A little program is being Built to store customer's Data. Since the company is having worldwide network of customers we have placed two Combo boxes one for each Country and City Name so as the user can select instead of typing it everytime. However a provision to edit the country and Cities list is necessary so there is a dedicated space allocated for this task where I have putted following controls:
Controls:
2 Text Boxes...1 Each for typing Country and City Names
2 List Boxes... 1 for showing Countries and 1 for showing the respective cities for the selected Country
4 Command Buttons ... 2 set of Add & remove
Problem:
Since i am a newbie, i am totally confused as how this sub-category thingy has to be done... I mean for instance if i have to add U.S.A. its pretty easy to type following block of code
Private Sub commandbutton1_Click()
Listbox1.additem textbox1.text
End Sub
But what if i want to add washigton cuz that has to be added as a sub iem of U.S.A i.e. only to be shown when U.S.A is selected... though i can simply add a huge block of If-Then but that will only work for preset items and if the user want to add another city then I will have to alter the If-Then block again