User defined Filter to compare a record against

GBalcom

Much to learn!
Local time
Yesterday, 23:44
Joined
Jun 7, 2012
Messages
462
This is going to be difficult to explain, so please ask questions as needed to clarify.

I have a program that does somethings with new records. I want this program to be able to send emails if certain conditions are met. This conditions will be user-defined at runtime (and saved as settings...somewhere by the app).

I'm struggling with:

  1. How to present the user interface for this
  2. how to retrieve these criteria to run in my code

The criteria will likely not be straightforward, (if equal to A), but may also be something like (A,B, and D), or (Not equal to A).

Surely this is something you guys have dealt with before, so please enlighten me.
 
Last edited by a moderator:
Can you provide a sample scenario with a little more detail?

You have 2 posts on this that seem to be duplicates ---can one be deleted?
 
I fixed the list here and deleted the duplicate post.
 
Thanks everyone.

MickJav,
I'm going to peruse your example and get back with any questions.


Jdraw,
Will do. So, this application is stand-alone, running without any interaction, on our server every few minutes. It compares a "shadow table" to the "live table" and searches for any new or changed records, then follows a series of actions based on the specifc changes per record.

So, if a target finish date of a project changes, then it will update our google calendar accordingly. If the status of a project changes, it will update that status on the calendar, and in other places...etc..

One of the features we would like it to do is send contextual email, based on specific filtering criteria. I've already setup a table and a form, allowing for a record for each specific email data (subject, body, SendToAddress, etc.) I've also allowed keywords such as %ProjectName%, or %JobNumber%. These will be replaced by the specific job information to make each sent email contextual.


This filter needs to be able to be set outside of code, in a settings form, basically for future needs. I'm the only VBA developer here, so I want to make it simpler if I'm not here.

This leads me back to my original questions. How to best store these filters, and how to bring them back into my VBA code to compare a job record against.
 
You can store the "WHERE" portion of an SQL clause and bring it in as needed (with a recordset or DLookup). Users generally couldn't write it, but you could provide the same sort of interface that would let them filter a form/report, and build/save the SQL from that. More info about the filters might yield better suggestions from everybody.
 

Users who are viewing this thread

Back
Top Bottom