473,320 Members | 1,955 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,320 software developers and data experts.

List Box Issue

In a database I am developing, I have a listbox with contents that
change per record that is being displayed. TO do this, the first
thing I tried is to change the rowsource via SQL in the forms current
event procedure. This resulted in an error that i haven't seen
before. It told me that the computer was 'Out of memory' and it would
not work. I assume it was probably an issue with the list box because
when I removed it, the error disappeared. Any thoughts?
Jan 17 '08 #1
6 1602
Brian wrote:
In a database I am developing, I have a listbox with contents that
change per record that is being displayed. TO do this, the first
thing I tried is to change the rowsource via SQL in the forms current
event procedure. This resulted in an error that i haven't seen
before. It told me that the computer was 'Out of memory' and it would
not work. I assume it was probably an issue with the list box because
when I removed it, the error disappeared. Any thoughts?
Now that you've deleted the listbox, it's hard to say. But that's a
voodoo SQL. Powerful SQL to go out of memory.

Maybe you had it set to Value instead of Table/Query. Or who knows what
you were attempting to stuff into the rowsource. I probably would have
checked to see what I was attempting to stuff into the rowsource...like
doing a debug.print on whatever you were stuffing into the listbox prior
to the stuffing...that way you could check your sql in the query builder.

Gigolo
http://www.youtube.com/watch?v=QbXPHiyE7uE
Jan 17 '08 #2
Salad <oi*@vinegar.comwrote:
: Brian wrote:
:In a database I am developing, I have a listbox with contents that
:change per record that is being displayed. TO do this, the first
:thing I tried is to change the rowsource via SQL in the forms current
:event procedure. This resulted in an error that i haven't seen
:before. It told me that the computer was 'Out of memory' and it would
:not work. I assume it was probably an issue with the list box because
:when I removed it, the error disappeared. Any thoughts?

: Now that you've deleted the listbox, it's hard to say. But that's a
: voodoo SQL. Powerful SQL to go out of memory.

: Maybe you had it set to Value instead of Table/Query. Or who knows what
: you were attempting to stuff into the rowsource. I probably would have
: checked to see what I was attempting to stuff into the rowsource...like
: doing a debug.print on whatever you were stuffing into the listbox prior
: to the stuffing...that way you could check your sql in the query builder.

I have had these 'out of memory' events too, recently.
But after one of these I can no longer reach my form or any of
its code, and since I'm not as certain as the OP as to where my
problem is, I have to go back to the most recent backup, put in
msgboxes everywhere and see whether I can spot anything before doom
sets in. Yesterday I discovered an infinite loop, and one of my
msgboxes was in the middle of it; I had to bring down Windows and
start all over again.

--thelma
from the tame world of Unix and C++, where at least
your code doesn't go into a black hole.

: Gigolo
: http://www.youtube.com/watch?v=QbXPHiyE7uE
Jan 17 '08 #3
Yeah, i thought it was the normal way to do things which is why it was
confusing me. Anyway, I didn't list that much information about the
problem the first time because I wasn't sure if there was some subtle
thing I was missing. Anyway, the listbox was set to Table/Query and
the SQL statement I was inserting is as follows:

SELECT tbl_ParentProc.Parent_Proc FROM tbl_ParentProc WHERE
[Component] = '" & Form_frmPumps.Pump_No & "' GROUP BY [Parent_Proc]
HAVING count(tbl_ParentProc.Parent_Proc)>0;

I wouldn't imagine this SQL statement causing the computer to run out
of memory because its not really that complicated.

This SQL statement works in other places, I have used the
'Debug.Print' option and tested the resulting SQL in its own query and
it was successful. I haven't had time to test it in the Northwind DB.
Jan 17 '08 #4
Thelma Roslyn Lubkin <th****@alpha2.csd.uwm.eduwrote in
news:fm**********@uwm.edu:
Yesterday I discovered an infinite loop, and one
of my msgboxes was in the middle of it
I just change the message to "Lyle is a genius" and send it off to my
client.

--
lyle fairfield

In ancient times Ulysses had to outwit the sirens, who had the power to
charm by their song all sailors who heard them, so that the mariners were
compelled to cast themselves into the sea to their destruction.
Today, he would have to deal with (free) Aim-Mail.

Jan 17 '08 #5
Brian wrote:
Yeah, i thought it was the normal way to do things which is why it was
confusing me. Anyway, I didn't list that much information about the
problem the first time because I wasn't sure if there was some subtle
thing I was missing. Anyway, the listbox was set to Table/Query and
the SQL statement I was inserting is as follows:

SELECT tbl_ParentProc.Parent_Proc FROM tbl_ParentProc WHERE
[Component] = '" & Form_frmPumps.Pump_No & "' GROUP BY [Parent_Proc]
HAVING count(tbl_ParentProc.Parent_Proc)>0;

I wouldn't imagine this SQL statement causing the computer to run out
of memory because its not really that complicated.

This SQL statement works in other places, I have used the
'Debug.Print' option and tested the resulting SQL in its own query and
it was successful. I haven't had time to test it in the Northwind DB.
See if changing
Form_frmPumps.Pump_No
to
Forms!frmPumps!Pump_No
will assist in solving your problem. Not sure if this addresses the
problem.

I suppose you update the rowsource with something like
Me.ListBoxName.RowSource = strSQL

Hilarious Britney
http://www.youtube.com/watch?v=6FAuJod1XmY
Jan 17 '08 #6
That did not solve my problem. I ended up finding a suitable
workaround though. I had this information in s subform and I ended up
just forcing the user to open up that form via command button rather
than displaying directly on the form. A little tedious but I no
longer get the error.
Jan 17 '08 #7

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

Similar topics

8
by: Guy Hocking | last post by:
Hi there, I am having a few problems compiling a list box that is conditional on what is selected in another list box. What i need is a List box (lstArea) that displays one thing when the List...
2
by: google | last post by:
Hello everyone, I am having an issue using the "Multi Select" option in a list box in MS Access 2003. I am making a form that users can fill out to add an issue to the database. Each issue can...
57
by: Xarky | last post by:
Hi, I am writing a linked list in the following way. struct list { struct list *next; char *mybuff; };
27
by: Tripper | last post by:
Which is the better way to go and why? //trivial example List<string> strings = GetStrings(); foreach (string s in strings) { // some operation; } strings.ForEach(
65
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the...
9
by: gamehack | last post by:
Hello all again, Sorry for troubling you with my problems. I've tried to implement simple double linked lists, here's my structure: struct DResult { double val; char* title; struct DResult*...
7
by: Chris Brat | last post by:
Hi, Is there a better way to replace/remove characters (specifically ' and " characters in my case, but it could be anything) in strings in a list, than this example to replace 'a' with 'b': ...
0
by: Paul Hadfield | last post by:
I'm looking for thoughts on the "correct" design for this problem (DotNet 2.0 - in winforms, but that's not so important). I've got two combo boxes (combo1 and combo2), both are populating via...
4
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so...
45
by: Zytan | last post by:
This returns the following error: "Cannot modify the return value of 'System.Collections.Generic.List<MyStruct>.this' because it is not a variable" and I have no idea why! Do lists return copies...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.