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 / Queries / March 2008

Tip: Looking for answers? Try searching our database.

Filter using a Macro that runs a Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris DP - 24 Mar 2008 12:24 GMT
I am using Access 2007. In a previous version I created a simple query that
enabled a search on Company Name; Like "*" &[Enter Company Name] & "*", which
was written under criteria for Compnay Name in a query window. I then created
a button on a Form that ran this query via a macro. If pressed I could search
for a specific Compnay Name and if pressed again it would find another one.
However,in Access 2007 when I do press the button a second time it finds the
same company name ie runs the filter with the original company name. I have
tried Remove Filters, in a number of ways, but this still dosnt sort it out.
Does anyone know how I can do this is a similar simple way.
Chris DP - 24 Mar 2008 17:25 GMT
Currently I have found a way around this, which is to add a line at the start
of the macro which closes the Form. This has the effect of resetting the
filter! The Form is automatically reopened, due to the query, and asks for
the Company Name to be entered. It doesnt, therefore, revert to the previuos
data entered. Although this works it is surely not the best way to do it. In
Access 2003 there was no such problem. Can anyone advise me why there is a
difference on something so basic and what would be the better way to deal
with it.

> I am using Access 2007. In a previous version I created a simple query that
> enabled a search on Company Name; Like "*" &[Enter Company Name] & "*", which
[quoted text clipped - 5 lines]
> tried Remove Filters, in a number of ways, but this still dosnt sort it out.
> Does anyone know how I can do this is a similar simple way.
 
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.