tr******@comcast.net wrote in
news:85547056-aa3f-42f7-9e58-50f50e002cc1
@e39g2000hsf.googlegroups.co
m:
I have a form that screens the database. I build a dynamic WHERE
clause into a string and apply it to the form's filter.
I want to allow the user to save, say, five or 10 of their
most-used WHERE clauses. I would like to prompt them to name the
clause something useful when they save it. I want to save these
clauses into a 2 column list box with only the description column
showing (no need for them to see all the SQL).
I need to be able to bring the saved clauses up each time the user
uses the form. I also need a way to delete any clauses no longer
wanted as well as limit the amount of saved clauses at any one
time (10 maximum).
Any ideas?
Thanks for the help in advance.
Troy Lee
"I want to save these clauses into a 2 column list box"
List boxes do not save data. Tables are the only place to store
data.
Build a table with 3 or more columns: UserID, Description,
whereClause (necessary) , dateCreated, countOfUsage (optional)
Populate the listbox from the table. You will need buttons on the
form, near the listbox to "delete selected Filter" and another to
Save New Filter.
to limit the number of records, use a Dcount() call to determine if
there are already >= 10 rows for UserID, popup a message if true,
run an SQL insert to the table if false.
--
Bob Quintal
PA is y I've altered my email address.
** Posted from
http://www.teranews.com **