[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

combo box w/criteria in the row source to show all previous entries even when the criteria doesn't match

Posted on 2014-08-21
3
Medium Priority
?
330 Views
Last Modified: 2014-09-02
I have an Access 2010 database with a combo box in a subform that is in datasheet view.  In the row source of the combo box I have a query that limits the entries in the combo box based on criteria that it gets from the main form.  This part works correctly.  The problem I am having is that previous records in the datasheet subform don't show the entries in the combo box field if the criteria in the current record doesn't match.  For example:  the main form has a field called "Origin".  This data may change or it may stay the same depending on the unique circumstances of the record.  In the combo box on the subform I tell it it to look at the data in the "Origin" field and filter the set of data that populates in the combo box according to the data.  Because "Origin" can change, the entries that show up in the combo box changes too.  When this happens all the records with that combo box field are blank.  Help, please.
0
Comment
Question by:animallover
3 Comments
 
LVL 52

Expert Comment

by:Gustav Brock
ID: 40278275
This is done using the OnEnter and OnExit events of the combobox:

  OnEnter, set the filter as you do now for the current record.
  OnExit, remove the filter so all options will be showed.

/gustav
0
 
LVL 40

Accepted Solution

by:
PatHartman earned 2000 total points
ID: 40278946
I created a sample database to explain the problem and show one possible solution.  The format is .mdb since the problem has existed forever.
FixCascadingCombos130128.zip
0
 

Author Closing Comment

by:animallover
ID: 40298999
Thank you.   This is exactly what I was looking for.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

872 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