Is it possible to limit records in a ComboBox based on the info? (1 Viewer)

12asd

Registered User.
Local time
Today, 09:39
Joined
Dec 11, 2017
Messages
15
I want to include a CombBox in a form and only display certain records, the combobox will reference a table for all the records, however I only want specific records to be displayed.

For example, say I have:
Column1 Column2 Column3

Where Column1 and Column 2 have to different piece of information, i.e. first name and last name, opr item name and price. And Column3 can contain certain values, i.e. M/F or Yes/No.

How would I limit the ComboBox to display records which only say Yes for Column3 and not every record.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:39
Joined
Jul 9, 2003
Messages
16,243
Use a query for the row source of the combobox.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:39
Joined
May 7, 2009
Messages
19,169
as with Mr.Gizmo, explains,
use Query as the row source of
your combobox. limit the
list by adding a Criteria on the
query, example:

Row Source Type: Table/Query

If Field3 (Column3 in combo) is Yes/No Field:
Row Source: SELECT Field1, Field2, Field3 FROM yourTable WHERE Field3 = True

If Field3 is "Yes" or "No" (string)
Row Source: SELECT Field1, Field2, Field3 FROM yourTable WHERE Field3 = "Yes"

If Field3 is "M" or "F"
Row Source: SELECT Field1, Field2, Field3 FROM yourTable WHERE Field3 = "M"
 

Users who are viewing this thread

Top Bottom