Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question 1

Status
Not open for further replies.

JohnAcc

Technical User
Aug 13, 2003
143
0
0
GB
I am new to access and would like to know how to populate a combobox on a form with the values Yes and No.

I am familiar with vba in excel and would usually type the following code in the form's initialize event.

combobox1.additem "Yes"
combobox1.additem "No"

How can I can do this in access. Thanx for your help in advance.

Regards, John



 
Go to the combo box's properties, click on the data tab, set the row source type property to value list and in the row source property type Yes;No

Voila
HTH
 
Set the RowSourceType to something like "Value list" and the RowSource to "Yes;No".

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
At the coding level,you can use...
[tt]
Me.combobox1.LimitToList = True 'or false [/tt]

This code can be added to a record / form event such as OnCurrent, or a control (combo box, text box) event.

Richard
 
Thanks PHV! Easiest Star you've ever earned Mate!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top