Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / September 2005

Tip: Looking for answers? Try searching our database.

RichTextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Francois Houde - 12 Aug 2005 16:29 GMT
Hi all ! I'm using a richtextbox on my form and I want to block the user
inserting image in it because if he do so, i get an insufficient system
ressources (err.3035)error.

the control i'm using is : RICHTEXT.RichtextCtrl.1

in my code i'm doing something like this :

strsql = "INSERT INTO .... "
currentdb.execute strsql.

I get the err:3035 on the currentdb.execute line.

If you have an idea on how to do this or a workaround it will be appreciated.

Thanks in advance

Francois Houde
Alex Dybenko - 13 Aug 2005 10:42 GMT
Hi,
not quite clear what you are trying to insert, and how this is correspond to
RichTextBox

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi all ! I'm using a richtextbox on my form and I want to block the user
> inserting image in it because if he do so, i get an insufficient system
[quoted text clipped - 15 lines]
>
> Francois Houde
Francois Houde - 15 Aug 2005 17:29 GMT
What I want is if thereis a way to make the rich text box "Text" only so the
users could not copy paste an image into it because it causes problem in my
sql statement if the image is to big.

Francois Houde
Alex Dybenko - 15 Aug 2005 19:54 GMT
Hi,
i think you can read .Text to save it into your table - this will return
only text portion of RTF box content

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> What I want is if thereis a way to make the rich text box "Text" only so
> the
[quoted text clipped - 3 lines]
>
> Francois Houde
Francois Houde - 16 Aug 2005 13:07 GMT
I didn't try the .text in my code but I know that if I do that, the font,
fontsize, bold, underline... will be lost when I save the data.

So I think I will say to my users that they should not put image in the RTB
because it will generate an error.

Thanks.

Francois Houde
Peter-d - 09 Sep 2005 22:43 GMT
the .text will indeed make you loose the benefits of having a rich text.

The only thing I can think of is to search the rtf text string for the
following code: "{\pict ...}" which will contain an ascii encoded version of
the picture. You can therefor detect before end if the use has inserted a
picture and warn them that this can't be done and force them to remove it
before saving the record.

Private Sub Form_BeforeUpdate(Cancel As Integer)
If InStr(1, Me.RTFcontrol.Value, "{\pict") Then
   MsgBox "you can't insert a picture. Delete the picture and try again."
   Cancel = True
End If
End Sub

If you want to really get into it, you could parse the rtf string and remove
everything starting with {\pict all the way until the next }.

It might also be possible to do the same checks on an afterupdate event for
the control.
Good Luck
Peter Dave

> I didn't try the .text in my code but I know that if I do that, the font,
> fontsize, bold, underline... will be lost when I save the data.
[quoted text clipped - 5 lines]
>
> Francois Houde
Jeff at Bennet-Tec.com - 14 Sep 2005 03:38 GMT
Would you consider an alternative - a different control
instead of the standard RichTextBox ?

Our ALLText control will give you ability to simply
not allow images.    If user tries to paste text + image
as might be copied from Word or IE, only the text
will be inserted but you will still get the the text formatting
( bold, italic, etc ).    

( Actually that is the default behaviour - if you want to
 allow images you have to add a line of code to tell
 ALLText that it should allow images )

Check it out at www.Bennet-Tec.com
You can download the install kit for a 30 day evaluation.
Just place ALLText on your Access form and start
typing or cut and paste from Word or other sources.

* * Please include a copy of this message with your reply

-----

    Jeff Bennett
    Jeff@Bennet-Tec.Com

    *    Bennet-Tec Information Systems, Inc  
    *    50 Jericho Tpk, Jericho, NY 11753
    *    Phone 516 997 5596,  Fax - 5597
    *    RELIABLE Components Make You Look Sharp!  
    *    TList/Pro    *    ALLText HT/Pro    *    MetaDraw    *  
    *    Custom Software Development Services Too.
    *    WWW.Bennet-Tec.Com  
   
===================     ===================

> Hi all ! I'm using a richtextbox on my form and I want to block the user
> inserting image in it because if he do so, i get an insufficient system
[quoted text clipped - 14 lines]
>
> Francois Houde
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.