|
From: robert.waters on 25 Jun 2008 19:05 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...(a)linvalid.com> wrote: > 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...(a)gmail.com> wrote in message > > news:3e91475b-0114-49fb-a189-cdae85317356(a)m44g2000hsc.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
From: Stephen Lebans on 25 Jun 2008 21:44 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/microsoft.public.access.forms/browse_fr... From: Stephen Lebans - view profile Date: Tues, Feb 14 2006 9:30 pm Email: "Stephen Lebans" <ForEmailGotoMy.WebSite.-WWWdotlebansdot...(a)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{\fonttbl{\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" <robert.waters(a)gmail.com> wrote in message news:f0db576e-4c4e-4520-8164-effa3f50d6e2(a)y21g2000hsf.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...(a)linvalid.com> wrote: > 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...(a)gmail.com> wrote in message > > news:3e91475b-0114-49fb-a189-cdae85317356(a)m44g2000hsc.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
From: robert.waters on 26 Jun 2008 16:11 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
|
Pages: 1 Prev: Book - learning material for MS Access Next: Beep in Database Window on Vista |