PC Review


Reply
Thread Tools Rate Thread

Filter By Form

 
 
Paul Mars
Guest
Posts: n/a
 
      18th Apr 2004
Form can be opened with several different RecordSources as:

DoCmd.OpenForm "MainData"
Forms!MainData.RecordSource = "RecordsAddress"

DoCmd.OpenForm "MainData"
Forms!MainData.RecordSource = "RecordsAddressChildren"

DoCmd.OpenForm "MainData"
'default RecordSource is AllRecords

When click "Filter By Form" on toolbar, the dropdown choice for each Form
control displays all values from the original Form RecordSource
"AllRecords". Although, if a value is selected that does not exist in the
current recordSource, it will not display when "Apply Filter".

I need the dropdown choices to be limited to the current RecordSource. How
can I do this?

tks,
Paul


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      18th Apr 2004
Paul, I think your abilities have outgrown the usefulness of the
Filter-By-Form (FBF) interface.

There are several issues with FBF, such as the one you hightlight. A more
severe one is that it does not work with an MDE file. That means FBF is not
a viable approach if you are writing databases for other people to use,
since the MDE is highly desirable to prevent people fiddling with or
accidentally decompiling (and so corrupting) your application.

When you reassign a form's RecordSource, you also need to guard against
having text boxes bound to fields that disappear (no longer in new
recordsource) or change type (especially relevant for calculated fields).
Access seems to evaluate the fields and their data types when the form
opens, so if things disappear or change type later, you can easily crash
Access (and possibly corrupt your mdb).

What we tend to do is to provide unbound text/combo boxes in the Form Header
section, with command buttons for Filter and RemoveFilter. These are
constantly available, more intuitive that FBF, and also allow to to avoid
some of the many Filter bugs in Access.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Paul Mars" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Form can be opened with several different RecordSources as:
>
> DoCmd.OpenForm "MainData"
> Forms!MainData.RecordSource = "RecordsAddress"
>
> DoCmd.OpenForm "MainData"
> Forms!MainData.RecordSource = "RecordsAddressChildren"
>
> DoCmd.OpenForm "MainData"
> 'default RecordSource is AllRecords
>
> When click "Filter By Form" on toolbar, the dropdown choice for each Form
> control displays all values from the original Form RecordSource
> "AllRecords". Although, if a value is selected that does not exist in the
> current recordSource, it will not display when "Apply Filter".
>
> I need the dropdown choices to be limited to the current RecordSource. How
> can I do this?
>
> tks,
> Paul



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      18th Apr 2004
"Allen Browne" <(E-Mail Removed)> wrote in message
news:40823de3$0$16582$(E-Mail Removed)...
> Paul, I think your abilities have outgrown the usefulness of the
> Filter-By-Form (FBF) interface.
>
> There are several issues with FBF, such as the one you hightlight. A more
> severe one is that it does not work with an MDE file. That means FBF is not
> a viable approach if you are writing databases for other people to use,
> since the MDE is highly desirable to prevent people fiddling with or
> accidentally decompiling (and so corrupting) your application.


FBF works just fine in MDEs (just not in the Runtime).

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 
Reply With Quote
 
Paul Mars
Guest
Posts: n/a
 
      18th Apr 2004
Thanks Allen,

I have filtered similar to your suggestion in the past. However I just
finally took the time to learn about FBF and it seemed to fit the bill, but
I guess there is no substitute for the tried and true.

Paul

"Allen Browne" <(E-Mail Removed)> wrote in message
news:40823de3$0$16582$(E-Mail Removed)...
> Paul, I think your abilities have outgrown the usefulness of the
> Filter-By-Form (FBF) interface.
>
> There are several issues with FBF, such as the one you hightlight. A more
> severe one is that it does not work with an MDE file. That means FBF is

not
> a viable approach if you are writing databases for other people to use,
> since the MDE is highly desirable to prevent people fiddling with or
> accidentally decompiling (and so corrupting) your application.
>
> When you reassign a form's RecordSource, you also need to guard against
> having text boxes bound to fields that disappear (no longer in new
> recordsource) or change type (especially relevant for calculated fields).
> Access seems to evaluate the fields and their data types when the form
> opens, so if things disappear or change type later, you can easily crash
> Access (and possibly corrupt your mdb).
>
> What we tend to do is to provide unbound text/combo boxes in the Form

Header
> section, with command buttons for Filter and RemoveFilter. These are
> constantly available, more intuitive that FBF, and also allow to to avoid
> some of the many Filter bugs in Access.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Paul Mars" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Form can be opened with several different RecordSources as:
> >
> > DoCmd.OpenForm "MainData"
> > Forms!MainData.RecordSource = "RecordsAddress"
> >
> > DoCmd.OpenForm "MainData"
> > Forms!MainData.RecordSource = "RecordsAddressChildren"
> >
> > DoCmd.OpenForm "MainData"
> > 'default RecordSource is AllRecords
> >
> > When click "Filter By Form" on toolbar, the dropdown choice for each

Form
> > control displays all values from the original Form RecordSource
> > "AllRecords". Although, if a value is selected that does not exist in

the
> > current recordSource, it will not display when "Apply Filter".
> >
> > I need the dropdown choices to be limited to the current RecordSource.

How
> > can I do this?
> >
> > tks,
> > Paul

>
>



 
Reply With Quote
 
Paul Mars
Guest
Posts: n/a
 
      18th Apr 2004
thanks and tell me how u do that fake e mail thing for the ngs. I have fake
e mail address' in my OE~Tools~Account~News~Properties~E mail and Reply to.
And people and spammers still click reply and my correct e mail is used. I
tried it and I received it.


"Rick Brandt" <(E-Mail Removed)> wrote in message
news:c5ttcp$5o47v$(E-Mail Removed)...
> "Allen Browne" <(E-Mail Removed)> wrote in message
> news:40823de3$0$16582$(E-Mail Removed)...
> > Paul, I think your abilities have outgrown the usefulness of the
> > Filter-By-Form (FBF) interface.
> >
> > There are several issues with FBF, such as the one you hightlight. A

more
> > severe one is that it does not work with an MDE file. That means FBF is

not
> > a viable approach if you are writing databases for other people to use,
> > since the MDE is highly desirable to prevent people fiddling with or
> > accidentally decompiling (and so corrupting) your application.

>
> FBF works just fine in MDEs (just not in the Runtime).
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
>



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      18th Apr 2004
"Paul Mars" <(E-Mail Removed)> wrote in message
news:u5A%(E-Mail Removed)...
> thanks and tell me how u do that fake e mail thing for the ngs. I have fake
> e mail address' in my OE~Tools~Account~News~Properties~E mail and Reply to.
> And people and spammers still click reply and my correct e mail is used. I
> tried it and I received it.


Mine is not a fake Email address. It's a hotmail account that I never read. I
check in just often enough to keep the account open and have it filtered to
reject all messages except those that come from me.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 
Reply With Quote
 
Paul Mars
Guest
Posts: n/a
 
      18th Apr 2004
so how do I change my default e mail address for ngs only??

"Rick Brandt" <(E-Mail Removed)> wrote in message
news:c5uids$5vla5$(E-Mail Removed)...
> "Paul Mars" <(E-Mail Removed)> wrote in message
> news:u5A%(E-Mail Removed)...
> > thanks and tell me how u do that fake e mail thing for the ngs. I have

fake
> > e mail address' in my OE~Tools~Account~News~Properties~E mail and Reply

to.
> > And people and spammers still click reply and my correct e mail is used.

I
> > tried it and I received it.

>
> Mine is not a fake Email address. It's a hotmail account that I never

read. I
> check in just often enough to keep the account open and have it filtered

to
> reject all messages except those that come from me.
>
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
>



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      18th Apr 2004
"Paul Mars" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> so how do I change my default e mail address for ngs only??


Depends on what you're using I guess. I use Outlook Express and when I set up
the properties for a particular News server I just enter the hotmail address
instead of my normal one.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 
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
Filter unbound search combo box based on filter in form's OnOpenEvent miatadiablo@gmail.com Microsoft Access Form Coding 3 1st Jun 2009 03:24 PM
Ac2003 form Filter problem cannot find filter to remove it for goo BillD Microsoft Access VBA Modules 0 14th Aug 2008 10:12 PM
Using Macro to Open Filter by form, clear grid, then run filter Victoria@DIG Microsoft Access Macros 0 20th Apr 2008 01:46 AM
Why does unlinked sub form lose filter when main form filter is turned off?? jgeniti Microsoft Access Forms 4 29th Jan 2007 05:13 PM
Filter the main form based on a subform filter bjc3@spinfinder.com Microsoft Access 3 17th Oct 2006 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:26 PM.