By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,077 Members | 2,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,077 IT Pros & Developers. It's quick & easy.

Access 'there isnt enough memory' when scrolling textbox

P: n/a
I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.

Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). It seems like Access is hitting a wall
somewhere.

Is there another textbox-like control that will accept more data? I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? Any solutions?

Thanks in advance,
Robert Waters
Jun 27 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"robert.waters" <ro***********@gmail.comwrote in message
news:3e**********************************@m44g2000 hsc.googlegroups.com...
I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.

Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). It seems like Access is hitting a wall
somewhere.

Is there another textbox-like control that will accept more data? I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? Any solutions?

Thanks in advance,
Robert Waters
Windows has or had a limit on resource memory, controls on a form like combo
box and text box's use this limited memory. Anyway you can format the data
into a table format? Scrolling a sub-form record by record should not cause
a problem.
Jun 27 '08 #2

P: n/a
On Jun 23, 1:35*pm, "paii, Ron" <n...@no.comwrote:
"robert.waters" <robert.wat...@gmail.comwrote in message

news:3e**********************************@m44g2000 hsc.googlegroups.com...
I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. *I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.
Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. *The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). *It seems like Access is hitting a wall
somewhere.
Is there another textbox-like control that will accept more data? *I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? *Any solutions?
Thanks in advance,
Robert Waters

Windows has or had a limit on resource memory, controls on a form like combo
box and text box's use this limited memory. Anyway you can format the data
into a table format? Scrolling a sub-form record by record should not cause
a problem.
Unfortunately, the data is basically the contents of large text files
that I have put into the database and indexed (FULLTEXT) for
searching. This wouldn't be able to be presented inside of a
datasheet, unless I could programmatically resize a table cell, and
place a scrollbar inside of a table cell.

Is it possible to load a small chunk of the data into the textbox at
first, and then successively load more data/remove old data based on
how the user is scrolling?
(like how dzone.com loads more content as the user scolls, effectively
displaying all possible data on the first page.)
Jun 27 '08 #3

P: n/a
robert.waters wrote:
On Jun 23, 1:35 pm, "paii, Ron" <n...@no.comwrote:
>>"robert.waters" <robert.wat...@gmail.comwrote in message

news:3e**********************************@m44g20 00hsc.googlegroups.com...

>>>I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.
>>>Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). It seems like Access is hitting a wall
somewhere.
>>>Is there another textbox-like control that will accept more data? I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? Any solutions?
>>>Thanks in advance,
Robert Waters

Windows has or had a limit on resource memory, controls on a form like combo
box and text box's use this limited memory. Anyway you can format the data
into a table format? Scrolling a sub-form record by record should not cause
a problem.


Unfortunately, the data is basically the contents of large text files
that I have put into the database and indexed (FULLTEXT) for
searching. This wouldn't be able to be presented inside of a
datasheet, unless I could programmatically resize a table cell, and
place a scrollbar inside of a table cell.

Is it possible to load a small chunk of the data into the textbox at
first, and then successively load more data/remove old data based on
how the user is scrolling?
(like how dzone.com loads more content as the user scolls, effectively
displaying all possible data on the first page.)
Is the data that you want to see going to be modified? Or viewed only?
Do you have lots of these big memos?

Maybe you could check the size of the memo field. If it's less than n
number of bytes (I'll assume you know about how many) then present it in
an unbound text box. If over the n byte limit, send the output to a
text file and enter something like "Memo to large to fit. Dbl-Click to
view". Then write the memo out to a doc file and open it in Word or
WordPad.

Jun 27 '08 #4

P: n/a
There is a 64KB limit when the user interaction with the control is
required. This is an old GDI WIndows limitation linked to the 64KB limit of
the ScrollBar control.

Other than cutting your data up into manageable chunks, you could use the
RTF control on my site that you mentioned failed. You just have to set the
MaxCharsAllowed property in the Load event of the form containing the
control. I think I maxed this value out at 1000KB.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"robert.waters" <ro***********@gmail.comwrote in message
news:3e**********************************@m44g2000 hsc.googlegroups.com...
>I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.

Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). It seems like Access is hitting a wall
somewhere.

Is there another textbox-like control that will accept more data? I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? Any solutions?

Thanks in advance,
Robert Waters

Jun 27 '08 #5

P: n/a
Thank you Mr. Lebans. I think I might have figured out why it
wouldn't work.
The RTF control displays nothing at all, but when I print something
like mid(rtfcontrol.value,1,50) to the immediate window, I see the
data.
Do control characters (\t, \n et al) mean anything special in rtf-
speak? They might be suppressing the output...

On Jun 23, 9:33*pm, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@linvalid.comwrote:
There is a 64KB limit when the user interaction with the control is
required. This is an old GDI WIndows limitation linked to the 64KB limit of
the ScrollBar control.

Other than cutting your data up into manageable chunks, you could use the
RTF control on my site that you mentioned failed. You just have to set the
MaxCharsAllowed property in the Load event of the form containing the
control. I think I maxed this value out at 1000KB.

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

"robert.waters" <robert.wat...@gmail.comwrote in message

news:3e**********************************@m44g2000 hsc.googlegroups.com...
I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. *I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.
Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. *The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). *It seems like Access is hitting a wall
somewhere.
Is there another textbox-like control that will accept more data? *I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? *Any solutions?
Thanks in advance,
Robert Waters
Jun 27 '08 #6

P: n/a
You cannot insert plain text when the control requires RTF encoded text.

Use an Unbound RTF2 control.
In the Current event of the form hosting the RTF2 control do something like:
Me.NameOfUnboundRTF2Control.PlainText =
Me.NameOfYourTextBoxBoundToYourMemoFIeld.Value

Check the PlaintText property name(RTF2 control -Properties and make sure
I spelled it correctly.

If you want to control the RTF Header and Footer you must prepend/append to
your plain text string then see the code/logic in this post:

..

The RTF control can only display RTF encoded text. If you want to simply
display plain text then wrap your plain text within the required RTF
encoding.
Here's a previous post of mine on a related issue.
http://groups.google.ca/group/micros...orms/browse_fr...
From: Stephen Lebans - view profile
Date: Tues, Feb 14 2006 9:30 pm
Email: "Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com>
Groups: microsoft.public.access.forms
Not yet ratedRating:
show options
Reply to Author | Forward | Print | Individual Message | Show original
| Report Abuse | Find messages by this author
Let me know how you make out.
Make sure your Form has:
A TextBox control named txtComment bound to the Comment field(just o you can
see the RTF encoding)
an RTF2 control bound to the Comment field
A CommandButton named cmdRTF
In your References, make sure the ref to DAO is higher in the list than ADO.
Place this code behind the Command Button.
Private Sub CmdRTF_Click()
On Error GoTo Err_CmdRTF_Click
Dim sRTFdata As String
Dim sHeader As String
Dim sText As String
sHeader =
"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttb l{\f0\fnil\fcharset0
Arial;}}"
sHeader = sHeader & "{\colortbl
;\red0\green0\blue0;}\viewkind4\uc1\pard\cf1\fs24"
' I could have shortened the code but I wanted you(and others I refer to
this posting) to see what is happening at every step.
With Me.RecordsetClone
' Move to first record
.MoveFirst
' Loop until all records are processed
' This example uses a field named "Comment"
' Note this is the name of the FIELD not the
' name of the TextBox control bound to this field
Do While Not .EOF
.Edit
sText = IIf(IsNull(.Fields("Comment")), "", .Fields("Comment"))
' See if field is empty
If Len(sText & vbNullString) = 0 Then
sRTFdata = sHeader & "}"
Else
sRTFdata = sHeader & sText & "\par }"
End If
' Save our RTF encoded string back to Comment field
.Fields("Comment") = sRTFdata
.Update
' Move to next record
.MoveNext
Loop
End With
Exit_CmdRTF_Click:
Exit Sub
Err_CmdRTF_Click:
MsgBox Err.Description
Resume Exit_CmdRTF_Click
End Sub

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"robert.waters" <ro***********@gmail.comwrote in message
news:f0**********************************@y21g2000 hsf.googlegroups.com...
Thank you Mr. Lebans. I think I might have figured out why it
wouldn't work.
The RTF control displays nothing at all, but when I print something
like mid(rtfcontrol.value,1,50) to the immediate window, I see the
data.
Do control characters (\t, \n et al) mean anything special in rtf-
speak? They might be suppressing the output...

On Jun 23, 9:33 pm, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@linvalid.comwrote:
There is a 64KB limit when the user interaction with the control is
required. This is an old GDI WIndows limitation linked to the 64KB limit
of
the ScrollBar control.

Other than cutting your data up into manageable chunks, you could use the
RTF control on my site that you mentioned failed. You just have to set the
MaxCharsAllowed property in the Load event of the form containing the
control. I think I maxed this value out at 1000KB.

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

"robert.waters" <robert.wat...@gmail.comwrote in message

news:3e**********************************@m44g2000 hsc.googlegroups.com...
I have an Access database frontend linked via ODBC to a large
(gigabytes) mysql database.
I need to view a large amount of data in a a textbox (variable up to
300K), but I receive a 'there isnt enough memory' error whenever I
scroll past N number of bytes in a textbox that has been filled with a
lot of data. I am not sure what N is, but for a large chunk of data
it occurs at about the halfway scroll, and smaller chunks might not
throw the error until scrolling to the very end.
Now, this isn't an issue with system memory; I have 3GBs of RAM in
this machine, and plenty of fast (RAID0) pagefile access. The Access
application does not consume any more memory when the textbox is
scrolled than it did when the textbox was first filled (verified with
sysinternals procexp). It seems like Access is hitting a wall
somewhere.
Is there another textbox-like control that will accept more data? I
have tried Mr. Lebans' rich text box, but was not successful.
Has anyone tried working with large datasets and had a similar
problem? Any solutions?
Thanks in advance,
Robert Waters

Jun 27 '08 #7

P: n/a
It worked, well. Thank you.

I sandwiched the data between valid RTF codes (per your example), and
displayed it using the PlainText property of the RTF control.
All I need to do is run a regex to replace valid characters with their
RTF equivalents (\ldblquote et al), and it will have completely solved
my problem.

Thank you,
Robert Waters
Jun 27 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.