?
Solved

populate a combobox from table with criteria

Posted on 2013-01-29
2
Medium Priority
?
386 Views
Last Modified: 2013-01-29
Hi  I am using Access 2010

I have a table with two fields.  

Table Name :  MyTable

Table fields below..
[Transaction Type]     ...  Text field
[Type ID]               ...  Numeric field

On my form,  I have a combobox.  I would like the dropdown selection to show table entries of [Transaction Type]  where  [Type ID] > 2

I would like to do this in the Form Load event.  I appreciate your help.
0
Comment
Question by:peispud
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38832616
private sub form_load()

me.comboName.rowsource="select  [Type ID],[Transaction Type]  from MyTable Where  [Type ID] >2"


end sub

set the combo
column count to 2
bound column 1
column widths 0; 1
0
 

Author Closing Comment

by:peispud
ID: 38832766
Thank you.  

I'm getting through this project with some awesome help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question