Filters on Forms

Posted on 2012-08-10
Medium Priority
Last Modified: 2012-08-18
I have a form (frmProviders) that reads the record source "providers".

In that table there is a lookup to another table "states".  when creating a new record in Providers I allow a lookup to the states table ,so the user doesnt have to type in the two digit state abbr each time.  

On the form (frmproviders) i want tobe able to filter all the records to only display a certain state. When i use a combo box "and select find records on form" the value the box is displaying the two digit Code associated with the state and not the two character abbrreviation (ie.  Al).

What am I dont wrong?
Question by:seamus9909
  • 3
LVL 40

Expert Comment

ID: 38283126
You can create this combobox with master and in this case you will see how to set visible proper field from table. You can, of course, go to combo box properties, open Format tab and set column count to 2 and  Column width of fields to 0,1
LVL 19

Expert Comment

by:Richard Daneke
ID: 38283692
When you use a combo box to simplify data entry, you are complicating filters.

The combo box is matching a code to bring in the state abbreviation.   Although the combo box shows the state abbreviation, the data being stored in the code used to search the 'states' table.

As als315 referenced, this is due to the lookup table properties showing the second column of the combo box data.  Column Couont:2 and ColumnWidth:"0; 1".  
If you set your filter combo box properties to match the data entry properties, you should be okay.

Author Comment

ID: 38287225
When I do as instructed and set the Column Count to 2 and the width to 0,1.  I still only see the State Code and not the abbreviation.
LVL 40

Expert Comment

ID: 38287314
May be you are selecting only State code in record source query? You should have 2 columns there (Code and Name).
LVL 40

Accepted Solution

als315 earned 2000 total points
ID: 38287402
Look at this sample

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

862 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