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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using "All" as a Combo Box Selection Criterion

Status
Not open for further replies.

Sisco

Technical User
Jul 11, 2000
12
US
Hello All!
Can anyone provide me with a working example of using "All" in a Combo box that when selected will open a continuous form displaying records containing the previous Combo's value or ALL if selected? I tried the AddAllToList function, but couldn't get it to work.
Example:

View Open Cases By Atty:
Select the Atty in the Combo box or Select "All"

The AfterUpdate Event would then Open a form in which the recordset would contain the appropriate info.

Thanks!

Sisco
 
I would create a query as the record source for my form. As criteria for the field that has the data from the combo box I would use this as criteria:

IIf([Forms]![YourForm]![ComboBox]="All",[SearchField],[Forms]![YourForm]![ComboBox])

This if statement worked for me. SearchField is the field in your query that would match the data in the combobox. You must also requery your form in the combo box's after update event.
ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top