Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ComboBox base on an other one

Posted on 2013-11-25
2
Medium Priority
?
339 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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 …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Suggested Courses

963 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