Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Converting My filters into a text string

Posted on 2011-02-27
3
Medium Priority
?
211 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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

963 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