Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need a example for combobox !!!!!
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00288395
Message ID:
00288409
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform