Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / April 2007

Tip: Looking for answers? Try searching our database.

Form Filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
myxmaster@hotmail.com - 30 Apr 2007 16:27 GMT
Where do I look to place the following code to filter the form based
on the combobox result.

filter the form rather than navigate to the first match set the
form's
Filter and FilterOn properties:

 Dim strFilter As String
 strFilter = "Category = """ & Me.Combo24 & """"
  Me.Filter = strFilter
 Me.FilterOn = True

TIA
Rick Brandt - 30 Apr 2007 16:33 GMT
> Where do I look to place the following code to filter the form based
> on the combobox result.
[quoted text clipped - 9 lines]
>
> TIA

The AfterUpdate event of the ComboBox would be one place.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Wayne-I-M - 30 Apr 2007 16:40 GMT
Hi

Use the after update event of the combo

   Dim Something As Object
   Set Something = Me.Recordset.Clone
   rs.FindFirst "[Category] = " & Str(Me![Combo24])
   Me.Bookmark = rs.Bookmark

Signature

Wayne
Manchester, England.

> Where do I look to place the following code to filter the form based
> on the combobox result.
[quoted text clipped - 9 lines]
>
> TIA
myxmaster@hotmail.com - 30 Apr 2007 16:47 GMT
On Apr 30, 8:40 am, Wayne-I-M <Wayn...@discussions.microsoft.com>
wrote:
> Hi
>
[quoted text clipped - 25 lines]
>
> - Show quoted text -

Hi Wayne,
I tried this however the code stops at:

   rs.FindFirst "[Category] = " & Str(Me![Combo24])
I'm wondering is this because the category column is itself a lookup
field in a table, therefore instead of showing say, "Credit" it is
reflecting it;s numerical position on the list say "1"?
Wayne-I-M - 30 Apr 2007 20:54 GMT
Hi

I wouldn't use a lookup field in a table (have a look around this forum as
there are zillions of referecne to the problems this may cause).  You may be
better using a combo (instead of the lookup field) linked/sourced from the
table (the one you are referencing in your lookup at the moment).  
AfterUpdate on this new combo you could set focus to the next combo and run
the GoTo.  

Ensure that you set the bound column (of the 1st comb) to the something that
means something - like the string/text name and not the placeing in a list as
this seems a bit strange to me.

Note that  am not refereing to a casscading combo but simply an afer update
setfocus and run code - there is a difference.

Give it a try and let us know what happens.  It may be a little extra work
but I think you will find it helpful.

Hope this helps

Signature

Wayne
Manchester, England.

> On Apr 30, 8:40 am, Wayne-I-M <Wayn...@discussions.microsoft.com>
> wrote:
[quoted text clipped - 35 lines]
> field in a table, therefore instead of showing say, "Credit" it is
> reflecting it;s numerical position on the list say "1"?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.