Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on a subform

Status
Not open for further replies.

Brogrim

Technical User
Jul 28, 2000
184
0
0
IE
I have a subform on a main form.

I want to Filter the records shown in the subform

The record sourse is tblMemALSSerRoster

There is a field called MemALSSerAgreeTypeID which has 2 values 1 & 2

I have tried to use the following

MemALSSerAgreeTypeID = '1'

MemALSSerAgreeTypeID] = '1' (Do I only iuse [] when there is a space in the field name.

Thanks in advance
 
1. If there are spaces in a variable name you have to use the bracket [My Variable], otherwise it is sort of recommended;

2. If the ID is of variabletype 'number', you don't have to use the quotes, so:

MyVariableNumber = 1



Pampers [afro]
Keeping it simple can be very difficult
 
Thank you I have used your instructions but the dubform is still shown all the records

I am placing MemALSSerAgreeTypeID = 1 in the filter section of the form and the akkow filter is true.

Is this where this information should be

Thanks
 
What you have/want is the following?

Could you explain to me how all is setup, I don't understand.

1. Mainform with recordsource ??
2. Subform with recordsource
3. Combox/Field on ... form which ....





Pampers [afro]
Keeping it simple can be complicated
 
I have a mainform with a rtedcord sourse that includes the field memberID, this field is the link to the subform which has the memberid in its record sourse. This works fine but in the subform there is 2 types of records with either a 1 or 2 value in the MemALSSerAgreeTypeID field

I want to resrict the record's in the subform by the value 1. In the form properties I have put in

Filter - MemALSSerAgreeTypeID = 1

This does not restrict the number of records and when I look at the setting agin for the filter it says true.

Thanks
 
I would suggest that you populate the subform through a query, where you set a criterium for the MemALSSerAgreeTypeID to 1.


Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top