Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Converting My filters into a text string

Posted on 2011-02-27
3
Medium Priority
?
208 Views
Last Modified: 2012-05-11
Hi,
A slightly different question.
I have a continuous form.
I will apply some standard Access filters to this form.
E.g. Show all records where Product = "Widget"

I want to write a log to a one field  audit table in the format ;

"28/02/2011 17:22:20    Filter Applied : Product = Widget"

How do I capture the "Product = Widget" as a piece of text.  It does not have to be exactly in this format - I merely want to record the details of the filter applied.

I am hoping that there is a simple solution for this.  If it is very complex than it might not be worth my while.


0
Comment
Question by:Patrick O'Dea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1000 total points
ID: 34992445
try
msgbox me.filter

see what comes out.

if that gives you what you need, you can do this

"28/02/2011 17:22:20    Filter Applied : " & me.Filter
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 34992544
You might check to insure the Filter is on first, to avoid Null values:

If Me.FilterOn Then
  CurrentProject.Connection.Execute "INSERT INTO SomeTable(SomeField) VALUES '" & Now & " Filter Applied: " &  Me.Filter & "'"
End If
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 34992848
Thanks all,

Nice and easy
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question