Create Combo box with Data Source from Field in the Table

How to Create Combo box with Data Source from the field in the table

In this how to, I will show the step of creating the combo box with the data source from the field in the table in current database. In this example, I will use a Zip field from the table customer for a combo box data.
And then buy cialis http://cute-n-tiny.com/tag/hare/ those irritating symptoms may go away someday. Usually Krishna tila or black sesame seeds are administered with butter, it reduces sildenafil overnight pain and bleeding in women. It passed on a voice vote generic viagra purchase in the Senate’s Health and Human Services committee.It takes aim at a videoconferencing program instituted last year by the food and drug administration department. Blueberries are rich in flavonoids, which help those penile blood vessels relax and stay ready tadalafil india for an influx of blood.

#1. Created blank form and right hand click on the Detail black bar to insert the Form Header under the design view

create blankform

#2. Under the form design view, click on the combo box icon and paste it on the Form Header section.

combo box

#3. Select “I want the combo box to get the value from another table or query” then click Next> button, see picture below.

new combo

#4. Select table “tbl_Customer “ from the table list then click Next > button

select table

#5. Insert Zip field from the Available fields list to the right box by using single arrow (>) then click Next> button

select field

#6. Sort it by Zip and click Next>

sort field

#7. Leave check mark on the “Hide key column” Access will hide the Customer_Type_ID field and show only the Zip field in the combo box. Click Next> button.

hide key

#8. Name a combo box label as “Zip”

name label

#9. Double click on the combo box to open a Property Sheet. Change a combo box name to “cboZip”

name combo

#10.  Click on the Data tab of Property Sheet. Click on the 3 dots (…) next to Row Source to change the query.

update data source

 

#11. Delete the Customer_ID column. Leave only one column for Zip.

delete is

#12. Click on Crosstab icon and then click on Select icon to make a select query in order to group the Zip data. Save and close a Query Builder.

crosstab

#13. Click the Format tab of Property Sheet. Change Column Count to 1 and change Column Widths to 1.

edit column

#14. Click the Event tab and select the Event Procedure on the After Update Event then click on 3 dots (…) to add the VBA code.

zip event

#15. Since a Zip field has a data type as Number per the design view of tbl_Customer, we don’t need a single quotation mark (‘) before or after the double quotation mark (“). Enter code below for the After Update Event of cboZip combo box.

data type for zip

zip code

#16. In this example, I have a subform name tbl_Customer subform inserted into the Form Detail Section. I want to show only customers have address with zip code matching with the zip code that I selected on the combo box.

subform

#17. After I selected the Zip code on the combo box then the subform will display only the customers who have address with zip code matching with the zip code I selected on the combo box Zip as shown below.

zip result

Video Link:

1. How to Create Search Form using Combo Box

Related posts