Filtering Information on a subform through a Text-Box on main form

K

Ken

I have a general database that stores information for my company.

All the data is shown on a subform and on the main form portion I have
created buttons that will filter data through pre-made quiries.
For example, 1 button will filter data by going through a quiery which asks
for a value to be entered with which it will filter by.
In the "Cut #" critera column I have [Cut #?], which causes the quiery to
ask the user for value.

I am curious to how I can create a text-box in the form that will allow the
user to filter info simply by typing in the value and pressing enter..

Thanks in advance for any light you may shed..
 
A

Allen Browne

Ken, is it okay for the subform to show no records until the user enters a
Cut #?

If so:
1. Open the main form in design view.

2. Add a text box (or combo?) on the main form, and give it this name:
txtCut
If the [Cut #] field is a Number type in your table, also set the Format
property of this text box to:
General Number

3. Click the edge of the subform control. Set these properties:
Link Child Fields: [Cut #]
Link Master Fields: txtCut

The subform will now show only those records that match the Cut # in the
main form.
 
Top