473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Write to and store data in a listbox

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
Aug 24 '08 #1
2 3700
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 **
Aug 24 '08 #2
On Aug 24, 3:21 pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
troy_...@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 fromhttp://www.teranews.com**
Thanks Bob for the quick response. I should have thought of this.
Thanks for pointing out my obvious error about storing the WHERE
clauses in a listbox.

This sounds promising. I will definitely give it a try. Thanks.

Troy Lee
Aug 24 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jared | last post by:
Store List Box values I have a form that has hundreds of records in it. The form has a list box with 10 different options in it. The user is able to select multiple options from the list box....
3
by: Uma sakshi | last post by:
Hi I have one VB.NET application,in that application i have one datagrid control.The datagrid control contains somedata.I want to copy the data in a particular cell and paste it into my C#.NET...
1
by: A. Spiehler | last post by:
I'm trying to fill a listBox control with string members from an array of objects. I think using data binding is supposed to be the easiest way to do this. I've never used data binding before and...
0
by: Svenn Bjerkem | last post by:
Hi, Armed with Programming Python 3rd Edition and Learning Python 2nd edition I try to write an application which I at first thought was simple, at least until I was finished with the GUI and...
3
by: Riun | last post by:
Hi, The Listbox on my form contains 7columns. In the OnClick event, the data in the row which is clicked on, is written to different textboxes. the last 3 columns contain data that need to be...
0
by: Cezus | last post by:
Good day, Im a beginner at C# and i use the book Visual C# 2005: How to program from Deitel/Pearson. I want to build a simple Anime (movie) database. It contains a list box with all the anime...
2
by: rrflore2 | last post by:
Ok. I'm writing and deleting to an xml file using a dataset. I have a function in my codebehind page that binds a listbox to the dataset that performs the writes/deletes. Everything seems to be...
9
by: Ajinkya | last post by:
Hello friends ! , I am very new to java script.If anyone can help me then I will be very very thankful to his/her. I am using php and mysql in my project and I have one textarea and one...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.