Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need a example for combobox !!!!!
Message
 
To
08/11/1999 08:42:06
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00288395
Message ID:
00288409
Views:
12
>Hello!
>Can someone please help me!!!
> I would like to have a combo box on a form. Choose a category from my combo box and enter it in my table in a (Access)database.I have about six or seven categories that go into my combo box. Example:
>-Montreal
>-Toronto
>-Quebec
>-Ottawa
>-St.Johns
>-Calgary
> and so on.I want to be able to choose a city, as I am taking in all the other coordinates, and enter it in a field in my database.
>Can someone please give me a example on how to do that.Thank You in advance.
> Sincerely,
> Renaud Martowski
>e-mail:MARTOWSKI-RENAUD@ithq.qc.ca

Place a combobox and a command button on a form and copy this code snippet:

Private Sub Command1_Click()
MsgBox Combo1.Text
End Sub

Private Sub Form_Load()
With Combo1
.AddItem "Montreal"
.AddItem "Calgary"
End With
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform