Connecting Tech Pros Worldwide Forums | Help | Site Map

little filter problem in access 97

sparks
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a table with data like this

id data data data lookup
1 ### ### ### 1
1 ### ### ### 12

I need to put this in 2 subforms
subfrm1 will have id=1 and lookup=1
subfrm2 will have id=1 and lookup=12

I tried a filter in each subform and I get
the same data in both subforms...I assume the
first record with this is
id data data data lookup
1 ### ### ### 1

someone said that filters in access97 had
to be enabled in the main form
something like
me.allowfilter
me.filteron = true

this did nothing with the filters.
maybe I am just looking at this wrong.

how can I get 2 sub forms to display different records by the lookup =1 or 12
with the id being 1 in both.
the main form is showing id 1 records from another the main table.
and the sub forms are linked to the main form with id


Jeff Smith
Guest
 
Posts: n/a
#2: Nov 13 '05

re: little filter problem in access 97


Create 2 queries and in the lookup field enter 1 in the first query and 12
in the second query in the criteria section. The SQL should read
SELECT id, data, data, data, lookup
FROM YourTableName
WHERE lookup = 1;

Use these queries as the recordsources for your sub-forms.

Jeff


"sparks" <jobob@lost.net> wrote in message
news:9eem21t228rv41t4i5dodkst2g49ukc1b0@4ax.com...[color=blue]
> I have a table with data like this
>
> id data data data lookup
> 1 ### ### ### 1
> 1 ### ### ### 12
>
> I need to put this in 2 subforms
> subfrm1 will have id=1 and lookup=1
> subfrm2 will have id=1 and lookup=12
>
> I tried a filter in each subform and I get
> the same data in both subforms...I assume the
> first record with this is
> id data data data lookup
> 1 ### ### ### 1
>
> someone said that filters in access97 had
> to be enabled in the main form
> something like
> me.allowfilter
> me.filteron = true
>
> this did nothing with the filters.
> maybe I am just looking at this wrong.
>
> how can I get 2 sub forms to display different records by the lookup =1 or[/color]
12[color=blue]
> with the id being 1 in both.
> the main form is showing id 1 records from another the main table.
> and the sub forms are linked to the main form with id
>[/color]


sparks
Guest
 
Posts: n/a
#3: Nov 13 '05

re: little filter problem in access 97


Works...thanks big time for the help

Sparks

On Mon, 7 Mar 2005 08:01:10 +1300, "Jeff Smith" <NoSpam@Not.This.Address> wrote:
[color=blue]
>Create 2 queries and in the lookup field enter 1 in the first query and 12
>in the second query in the criteria section. The SQL should read
>SELECT id, data, data, data, lookup
>FROM YourTableName
>WHERE lookup = 1;
>
>Use these queries as the recordsources for your sub-forms.
>
>Jeff
>
>
>"sparks" <jobob@lost.net> wrote in message
>news:9eem21t228rv41t4i5dodkst2g49ukc1b0@4ax.com.. .[color=green]
>> I have a table with data like this
>>
>> id data data data lookup
>> 1 ### ### ### 1
>> 1 ### ### ### 12
>>
>> I need to put this in 2 subforms
>> subfrm1 will have id=1 and lookup=1
>> subfrm2 will have id=1 and lookup=12
>>
>> I tried a filter in each subform and I get
>> the same data in both subforms...I assume the
>> first record with this is
>> id data data data lookup
>> 1 ### ### ### 1
>>
>> someone said that filters in access97 had
>> to be enabled in the main form
>> something like
>> me.allowfilter
>> me.filteron = true
>>
>> this did nothing with the filters.
>> maybe I am just looking at this wrong.
>>
>> how can I get 2 sub forms to display different records by the lookup =1 or[/color]
>12[color=green]
>> with the id being 1 in both.
>> the main form is showing id 1 records from another the main table.
>> and the sub forms are linked to the main form with id
>>[/color]
>[/color]

Closed Thread