Solved

ComboBox base on an other one

Posted on 2013-11-25
2
320 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
2 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
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 500 total points
Comment Utility
Set your criteria to:

LIKE NZ([Forms]![frm_Resen]![filtInst], "*")
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now