List Box Issue
am 17.01.2008 13:29:47 von Brian
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?
Re: List Box Issue
am 17.01.2008 14:58:03 von Tom van Stiphout
On Thu, 17 Jan 2008 04:29:47 -0800 (PST), Brian
wrote:
That is indeed the normal way to do it, so perhaps there are other
circumstances you haven't told us about yet?
Write similar code in the Northwind sample application. Does it fail
the same way (now we're REALLY interested). Your computer is fully
patched?
-Tom.
>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?
Re: List Box Issue
am 17.01.2008 15:04:42 von Salad
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
Re: List Box Issue
am 17.01.2008 15:25:52 von Thelma Lubkin
Salad wrote:
: 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
Re: List Box Issue
am 17.01.2008 15:28:17 von Brian
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.
Re: List Box Issue
am 17.01.2008 15:58:10 von Lye Fairfield
Thelma Roslyn Lubkin wrote in
news:fmnohg$ajm$1@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.
Re: List Box Issue
am 17.01.2008 17:37:54 von Salad
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
Re: List Box Issue
am 17.01.2008 18:37:12 von Brian
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.