Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ComboBox base on an other one

Posted on 2013-11-25
2
Medium Priority
?
337 Views
Last Modified: 2013-11-25
Hi,

2 comboBox : filtInst and filtOff

ComboBox "filtOff" depend on the value of comboBox "filtInst".
To do it, i use    Forms]![frm_Resen]![filtInst])

If the comboBox "filtInst" is empty, I would like to see all value of "filtOff".

How this can be done?

Thanks
0
Comment
Question by:Karl001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39674687
use vba codes to set the rowSource of the combo filtOff in the afterUpdate event of combo filtInst

private sub filtInst_afterupdate()

if me.filtInst & ""="" then
   me.filtOff.rowsource="select f1,f2 from tablex"
   else
  me.filtOff.rowsource="select f1,f2 from tablex where f1=" & me.filtInst
end if


end sub
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39674711
Set your criteria to:

LIKE NZ([Forms]![frm_Resen]![filtInst], "*")
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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

722 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