PC Review


Reply
Thread Tools Rate Thread

Access2000: Setting a filter to a subform

 
 
Arvi Laanemets
Guest
Posts: n/a
 
      26th Oct 2007
Hi

I have an unbound form fmMain. On this form I have some combo boxes
(cbbAGroup, cbbAStatus, cbbAStore), and a subform sfAssets, which is based
on form fmAssets.
The source for form fmAsset is a table tblAssets with fields AssetID,
AGroup,...,CurrStatus, CurrStore, ... etc.
For subform sfAssets is defined the link cbbAGroup-->Agroup, i.e. the
subform always displays assets of the single group, determined by combo on
fmMain.

Now 2 other combos must determine a filter condition for form fmAssets. The
filter condition will be (in simplified form, not the real formula)
Iif(cbbAStatus=0,"CurrStatus<>9","CurrStatus=" & cbbAStatus) &
Iif(cbbAStore=0,""," And CurrStore=" & cbbAStore)

It all works (right records according the set filter condition are
displayed), except that whenever I try to test it, I can't close the
application anymore. The only way to close the app is from task manager.

I disabled all code which sets filter conditions - the app closed normally.
I typed the filter condition manually in - the app didn't close. So my quess
is, the link for subform and the filter condition on its form somehow are
interacting.

Can someone here give some advice?


Thanks in advance!
Arvi Laanemets


 
Reply With Quote
 
 
 
 
Arvi Laanemets
Guest
Posts: n/a
 
      27th Oct 2007
Hi

I did find another solution here. Instead of filtering form source, I
replaced the table in RowSource with a guery, and edit now the RowSource
whenever cbbAStatus or cbbAStore change.

Arvi Laanemets


"Arvi Laanemets" <(E-Mail Removed)> wrote in message
news:%23QPp%(E-Mail Removed)...
> Hi
>
> I have an unbound form fmMain. On this form I have some combo boxes
> (cbbAGroup, cbbAStatus, cbbAStore), and a subform sfAssets, which is based
> on form fmAssets.
> The source for form fmAsset is a table tblAssets with fields AssetID,
> AGroup,...,CurrStatus, CurrStore, ... etc.
> For subform sfAssets is defined the link cbbAGroup-->Agroup, i.e. the
> subform always displays assets of the single group, determined by combo on
> fmMain.
>
> Now 2 other combos must determine a filter condition for form fmAssets.
> The filter condition will be (in simplified form, not the real formula)
> Iif(cbbAStatus=0,"CurrStatus<>9","CurrStatus=" & cbbAStatus) &
> Iif(cbbAStore=0,""," And CurrStore=" & cbbAStore)
>
> It all works (right records according the set filter condition are
> displayed), except that whenever I try to test it, I can't close the
> application anymore. The only way to close the app is from task manager.
>
> I disabled all code which sets filter conditions - the app closed
> normally. I typed the filter condition manually in - the app didn't close.
> So my quess is, the link for subform and the filter condition on its form
> somehow are interacting.
>
> Can someone here give some advice?
>
>
> Thanks in advance!
> Arvi Laanemets
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting filter on a subform from a calendar control Paul Doree Microsoft Access Forms 1 26th Mar 2008 04:50 PM
Filter problem. Removing filter in subform removes mainform/subform link Jesper F Microsoft Access Form Coding 2 30th Jan 2004 01:06 PM
Access2000 Subform Mike Windows XP General 1 11th Dec 2003 11:36 PM
Clearing a filter on one subform incorrectly clears filter on another subform BAM65Y Microsoft Access Form Coding 2 18th Nov 2003 04:26 AM
how to refer to a subform when setting its filter property Paul James Microsoft Access Form Coding 8 17th Oct 2003 09:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:49 PM.