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.

Issues ms rtf on mso 2003 ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hermawih - 01 Aug 2005 08:05 GMT
Problems on rtf office 2003

I have researched discussion on this richtextbox on mso 2003. I noticed that :

1. At first use , if you want to run that activex control then we must
change the compability flag to  numbers 0 or 1 or problably any other numbers
except 400 .
 
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX
Compatibility\CLSID of the ActiveX control

  It is not recommended by article # 240797 : How to stop an ActiveX
control from running in Internet Explorer .  That recommendation does not
come up with really good solution . instead that article arouse me another
question ,  If we should not change that registry number on compability flag
, then what should we do if we still want to use that  richtextbox control ??
Some members of discussion suggested using other rtf other than ms rtf . I
have not yet follow that  suggestions considering the time spends on changing
my codes .    
 
2. Other problems come up when I try to load or save the file . To simulate
what my problem  :

  2.A. Create one form : frm1
  2.B. Create on frm1 a command button Ie : cmd1 , cmd2
  2.c. Create rtf control , rtf1 .
  2.d. Create rich text documents using word pad , doc1.rtf  on C:\try .
  2.e. Create form module for command button .
       
       Private sub cmd1_Click()
         ' Load File
         me.rtf1.loadfile "C:\try\doc1.rtf",rtfRTF  
         doevents
       end sub
       Private sub cmd2_Click()
         ' Load File
         me.rtf1.loadfile "C:\try\doc2.rtf",rtfRTF  
         doevents
       end sub

         
3. Manually open doc1.rtf by double clicking that document and put some
values on that rtf . do the same with doc2.rtf . The problem occured if you
put table on that doc1.rtf or doc2 . I did copy table from word document  and
put that table on doc.rtf

4. Navigate by clicking cmd1 and cmd2 to load doc1.rtf and doc2.rtf . Do it
fast and often .

5. conclutions :
  4.1  only text values on doc1.rtf - OK ( I have tried with large - 568 KB
size for text value )
  4.2. text with table on doc?.rtf - hanged .( program is not responding
either calling savefile or loadfile)
  4.3. Insert object on that rtf only create link file even you do not
check it .
  4.4. Do not put big image on that rtf document or else ..."program is not
responding"
  4.5. This problem does not occured with mso 2002 .
  4.6. I have checked this not only with one machine .    
     
6. Anybody have the same experienced ?
7. Is there some new tips I miss that can solve this problem other than
using someone else rtf .

References:

1. microsoft.public.access.activexcontrol
2. http://groups-beta.google.com/group/comp.databases.ms-access
3. kb:240797

Signature

Hermawih

Hermawih - 01 Aug 2005 08:54 GMT
I forgot to mention that problem occured if :

A. Open the rtf document manually and copy the table ( doing it using
savefile method , problem did not occur)
B. The table is inserted with formula from ms equestion editor .

I suspect that this is because of security issues and maybe the problem not
only occured  with formula but with images or any other tipe of data (putting
text on the table did not arise the problem )

Signature

Hermawih

> Problems on rtf office 2003
>
[quoted text clipped - 66 lines]
> 2. http://groups-beta.google.com/group/comp.databases.ms-access
> 3. kb:240797
Sophie Guo [MSFT] - 01 Aug 2005 11:19 GMT
Hello,

I understand the inconvenience you have encountered. However the Rich
TextBox control is not supported in Access 2003, due to security
consideration.  For additional information, please read the following
articles:

828089 INFO: Migrating from Microsoft Office XP Developer
http://support.microsoft.com/?id=828089

249150 PRB: Microsoft Rich TextBox Control Does Not Work in Internet
Explorer
http://support.microsoft.com/?id=249150

Here are some workarounds for this issue at present:

1. Give up format rtf with the profit of a more recent format: HTML. You
could then use, for example, control ActiveX "WebBrowser control" to post
the text formatted in HTML.

2. Use a third party Rich Text control, such as FMS RTF control or this
RTF2 control from http://www.lebans.com/richtext.htm

3. Change the registry to lower the ActiveX security.  This would not be
recommended as it may cause security issues.  Here are the steps if you
want to test this:

A). Click the Start/Open, type "Regedit" in the Open box.

B). In left pane of the Registry window, locate the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX
Compatibility\{3B7C8860-D78F-101B-B9B5-04021C009402}

C). In the right pane of the Registry window, locate the "Compatibility
Flags", check the value of it.

D). If it is 400, change it to 000.

E). Open your database and open the form in design view.

F). Delete the original rtf1 rich text control from the form.

G). Add a new Microsoft Rich Text control in the form and still name it as
"rtf1".

H). Save the database and re-run the forms.
 
I hope the information is helpful.

Sophie Guo
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Sophie Guo [MSFT] - 01 Aug 2005 11:27 GMT
Hello,

For more information about the Microsoft WebBrowser Control,  refer to the
following inforamtion:

291926 PPT2002: How to Use the WebBrowser Control on a Slide
http://support.microsoft.com/?id=291926

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrows
er/reflist_vb.asp

I hope the information is helpful.

Sophie Guo
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Hermawih - 01 Aug 2005 13:58 GMT
Thanks sofie .

I have done all that things .
A. Change registry .
B. Delete rtf activex control
C. Create new one .

There are still problems as desribe with my experimentations.
Yes some people on the discussion forum suggest me using rtf2 by Lebans or
using FMS Memo . I have downloaded rtf2 but has not tried it since I have to
consider the time to change all the coding I have to adjust .

I have also had some works on using activex ms browser but not suitable for
my purposes .

Since this active control is not supported by Microsoft then I have to tried
Lebans or somehow change project's specifications .

Anyway thanks for the answer since I have now all the facts on what to do on
the issues .

Signature

Hermawih

> Hello,
>
[quoted text clipped - 56 lines]
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Stephen Lebans - 01 Aug 2005 17:41 GMT
Thank you Sophie for the excellent post. Up till now I have been
translating a MS PSS France post on this issue, now I can simply repost
yours.
:-)

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

> Hello,
>
[quoted text clipped - 56 lines]
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Hermawih - 02 Aug 2005 08:13 GMT
Just a thought .

As is described by :
249150 PRB: Microsoft Rich TextBox Control Does Not Work in Internet
Explorer : http://support.microsoft.com/?id=249150

I. It is Internet explorer that maybe contain some dangerous script - not
Access form .  or Probably the fear of using this control on Access pages ???

II. Based on the article above : Those are Loadfile and SaveFile methods
that Microsoft are afraid of .  Why not give up those two methods instead of
marking unsafe for the whole control .

III I can still use ms rtf because I can give up those two methods (loadfile
and savefile) .  One most important fact that I am now judging is other's
people registry setting .  I do not mind changing my setting because I can
control my environtment .

Pobably it will be unsafe or impolite to change someone else registry
setting since microsoft has made determined effort for security .

IV.  Maybe many people used that control only for saving data on the tables
which to our knowledge are not so dangerous as it is with loading and saving
file .  That is our present opinion based on our current knowledge which
could be wrong .

V. we have developed  quite a few libraries based on ms rtf .  That is why
moving to someone else rtf must be thought with deep and wise judgments .

VI. Lastly , what is not changed is the change itself .

Signature

Hermawih

> Hello,
>
[quoted text clipped - 56 lines]
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Hermawih - 02 Aug 2005 09:59 GMT
Winds of Change : Security .

Purposes :
1. Coping with changes in Access's developments .
2. As small part contribution as I have learned so much from mvps and book's
authors.

Background :
  As probably you already learnt on this discussion about ms rtf , that
activex is not supported by Microsoft.   If you used this ms rtf extensively
, then probably you must changed it all over in every part of your coding .  
Depending on your application's architecture , this changes could be
nightmare .  
 
  As it is for us , although this changes affected our application , we are
thankfull to VB book' authors that suggested    using 3 tier and OOP
methodology in a way that our changes are only in package for ms rtf  and
small part on user   Interface.

 
OOP - 3 tier with ms Access ?

I have developed none with VB but have read several books about OOP with VB
- I have not found any single book for Access that discuss about OOP .  That
is really unfortunate for Access developer in a way that they are not
introduced early enough
to the subject .  Those books ,OOP for VB , really chalenged me into
thinking how can I program ms Access with Object oriented methodology . My
first idea was that if VB can why can not be with ms Access .  

One author of the book warn me that probably it took the me a year until I
could understand and apply the concept of three tier architecture and OOP
methodology . well he was wrong . It took me two years until I finally Could
apply it on my project
with satisfaction . During those two years journeys , probably you have
experienced the same frustation when everything gone wrong . Fail .. fail and
fail .

I have email one author who wrote well known books for Access developer ,
asking him about how to program OOP with Access . He answered , No I can not
do it with Access . Instead he refered me to VB or VB.net .  I knew that he
is expert on VB and
VB.net .  I just could not understand why he answered that we can not do it
.  Maybe he has theoritical reason behind his reply .  I would not dare to
judge that he was wrong .

I will just give you one experimentation .

1. Creating object on Class module .
  A. Create one class module named it CMath .
  B. You can create properties or methods on that class .
     for simplicity's sake , I will just create just two methods .

     Public function Multiplication(lngNumber1 as long, lngNumber2 as long)
as long
         ' this is not useful function . just for showing the concept .
         Multiplication= lngNumber1 * lngNumber2
     end function  

     Public function Addition(lngNumber1 as long , longNumber2 as long) as
long
         ' this is not useful function . just for showing the concept .
         Addition = lngNumber1 + lngNumber2
     end function  

  C. Give instancing property for that class: Puclic not createable . (
Access only have two instancing : private and public   not createable )
  D. Now create a module named basInterface . On that bas interface Create
this function .

     public function CMath as CMath
        ' Set it to nothing first in case users forget . It prevent memory
leaks .
        set CMath = nothing
        set CMath = new CMath
     end function

2. Save that database as mclMath.mde ( you could just as well create it as
mdb or mda) mclMath shorts for class module function .
3. Create another database and named it AppTry.mdb .
4. Create reference to mclMath.mde  
5. in AppTry.mdb , create a form and named it frmTry .
  on that frmTry : create command button and named it btnTry .  Create
click event on that btnTry .
 
  Private sub btntry_Click()
    dim omath as CMath
    dim lngAdd as long

    ' Can not use New instancing because class module property is puclic
not createable
    ' Instead the creation is done in mclMath .
    set omath = CMath
' you can use intellisense which can not be done with general module
    lngAdd = oMath.addition(4,5)      
    msgbox "Then result is : " & lngAdd ' This should result = 9
    set omath = nothing
  end sub

6. Can I call this technique Object oriented programming ??
7. probably some will answer that this is not OOP . But it sure can help
managing which functions or method be inserted on this library database and
which are to others . ( One Author of OOAD suggest that " finding what object
is the most important on OOAD" and  "what to put where" is the second most
important thing of designing OO )

8. it is all the same with VB with several distinctions .
  A. VB can create DLL and exe library .
  B. VB class module have 5 instancing properties : private , public not
createable , global multiuse , ....

9. Anybody can tell me why can I not call this way of programming as OOP ???

My wish list :
1. Hopefully by giving this sample , some day some Access author can
introduce the concept of OOP to Access developers early , if applicable .
2. Hopefully someday Ms Access' class module can have global multiuse as vb
does , if applicable .

Signature

Hermawih

> Hello,
>
[quoted text clipped - 56 lines]
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Sophie Guo [MSFT] - 03 Aug 2005 06:39 GMT
Hello,

By default, if you insert the Rich TextBox control 6.0(SP4) in Access 2003,
you will receive the following message:

"Microsoft Office Access doesn't support this ActiveX control."

This is a by design behavior.  Although we can change the registry to use
the rtf control, this would not be recommended as it may cause security
issues.

If you need further assistance regarding the Rich TextBox control, I
recommend that you open a Support incident with Microsoft Customer Service
and Support (CSS) so that a dedicated Support Professional can work with
you in a more timely and efficient manner. If you need any help in this
regard, please let me know.

For a complete list of Microsoft Product Support Services phone numbers,
please go to the following address on the World Wide Web:
<http://support.microsoft.com/directory/overview.asp>

If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.

In addition, you are welcome to send suggestions for product enhancements
that you would like to see in future versions of Microsoft products to us
by submitting MS Wish. To send a comment or suggestion via the Web, use one
of the following methods:

a. In Internet Explorer 6, click Send Feedback on the Help menu and then
click the link in the Product Suggestion section of the page that appears.

b. In Windows XP, click Help and Support on the Start menu. Click Send your
feedback to Microsoft, and then fill out the Product Suggestion page that
appears.

c. By submitting your concern to mswish@microsoft.com you can get your
voice into the design plans for upcoming versions. Microsoft takes customer
requests and suggestions very seriously. MSWISH is your voice to the
development team. A significant number of the design change requests come
from our customers through the MSWISH alias and the MSWISH web site.
http://www.microsoft.com/mswish. I encourage you to submit this request.

Thank you. I appreciate your understanding and cooperation.

Sophie Guo
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Hermawih - 03 Aug 2005 09:20 GMT
Hello Sophie .

Thanks for your suggestions .

1. I could change my computer's registry setting but I do not want to change
people's registry setting . If anything goes wrong , I will be the one to
blame .

2. I have a little experimentation with Lebans's ocx . I am in luck because
Mr Leban used ms Riched32.dll . So the data in my tables are not necessary to
be converted .
If that is not the case , I am in big trouble .
A.  I maybe have to create some functions to convert old data
B.  Do it manually typing 1000 records --> could  take a month .

Well , I have to thank Mr Leban for preventing doing point 2A or point 2B .

3. Since Leban's ocx uses Microsoft Riched32.dll , what I need to change  is
minor .
That I should thank to VB Book's Author who adviced me doing  "OOP & 3/many
Tiers " .  At the time like this , the trouble I have endured learning it has
shown some payback .

4. Following your suggestion , I send my post entitled : Winds of change
security: to mswish@microsoft.com .
  If it is possible creating "global multiuse instancing" in Access's Class
Module then some people using the technique as mine would be glad .  It has
some advantages . One of them I can think of is when you are in "development
stage" . Creating library as mdb can use debugging features easily which can
not be done with dll .  

Thank you again .

Signature

Hermawih

> Hello,
>
[quoted text clipped - 51 lines]
> =====================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Dybenko - 03 Aug 2005 12:36 GMT
Hi Hermawih,
regarding "global multiuse instancing" in Access. I can not say you for sure
if this is possible, but you can try. Here a technique:
http://alexdyb.blogspot.com/2005/01/how-to-hide-procedure-in-library-mde.html

so look what attribute VB set for global multiuse class, and try to set the
same in Access
HTH
Signature

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

> Hello Sophie .
>
[quoted text clipped - 102 lines]
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
Hermawih - 04 Aug 2005 05:56 GMT
Hello Alex ,

Thanks for giving me a new way to look at it .

Since you mention about that technique , I have to tell my experiences so
someone will know what the troubles ahead .  Your suggestion remind me of my
experience doing the same technique I did . I have done similar technique to
give some class's procedure the ability to use  "For each" function .  But I
had some bad experiences doing it . I forgot what are the problems exactly .  
But maybe one or more from the list below that made me given up trying that
technique .

A. Rename the Class / procedure .
B. Copy the Class and give it another name .
C. Copy just the content of the procedure and create new class ---> This I
am sure will failed the technique .
D. ???..

Because the hassle I have encountered then  I am just satisfied with "For ..
Next" instead of "For each".  That is because I must do import and export
over and over again .

Probaby that will be applicable if :

1. It is for experimental's purpose .
2, one is certain about his coding and will never do the things I listed
above .
3. creating new class module and you have only a few class module .
4. Someone should not ever try to convert large existing class module doing
export and import or else .... ? well I do not want to be in that position
wondering if I did it with ClassA ?  ClassB ? ClassC ? ClassD ? .
5. Changes do happen so best prepare for it .

As it is for changing Globalmultiuse , this technique can not be done .
(I did for experimental purpose change "Attribute VB_Creatable = True" .
I have no idea if that is the one I should change )
Signature

Hermawih

> Hi Hermawih,
> regarding "global multiuse instancing" in Access. I can not say you for sure
[quoted text clipped - 110 lines]
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
Alex Dybenko - 04 Aug 2005 09:25 GMT
Hi Hermawih,

> As it is for changing Globalmultiuse , this technique can not be done .
> (I did for experimental purpose change "Attribute VB_Creatable = True" .
> I have no idea if that is the one I should change )

Could be, also agree that using such undocumented hacks is not a good idea.
I personally preffer to use VB6 to buld a DLL with library classes, and this
is works fine at me for several years

Signature

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

Hermawih - 04 Aug 2005 11:13 GMT
Hi Alex ,
"I personally preffer to use VB6 to buld a DLL with library classes, and this
is works fine at me for several years . "

I have no such luck .  But I will skip VB and just start learning VB.Net .
The decision I have made is based on my wild prediction that someday ms
Access will be powered by VB.net .  If the time come , hopefully I am well
prepared for that .  I even adjusted my ADO 's coding  in a way that if it is
converted , it will be accepted by ADO.net . Changes are unavoidable. I am
paranoid .

Signature

Hermawih

> Hi Hermawih,
>
[quoted text clipped - 5 lines]
> I personally preffer to use VB6 to buld a DLL with library classes, and this
> is works fine at me for several years
Hermawih - 05 Aug 2005 08:46 GMT
Alex Dybenko (MVP) wrote ,

I personally preffer to use VB6 to buld a DLL with library classes, and this
is works fine at me for several years

----
It crossed my mind now why expert Access's book author think that Access can
not do Object Oriented . Your comment gave me the answer to my question about
it .

Mostly Access's book author also expert on many tools such as VB, VC++ , etc .
They have such sophisticated technology so probably they have overlooked or
missed how to do it in Access .  If I were in their position , having that
tools , I have probably can not figure it out a simple way doing it in Access
.

As it is for me , Before I had only Access , I had no other way except
trying to figure it out using ms Access .  What OO in VB6 could do , as far
as I know can be done it ms Access .  Creating event , data structure ,
properties ,  .... .
Vb6 and Access can not do inheritance directly but it can use aggregation .  

I also found out that no books on ms Access suggest the technique for
creating simple way to create "User interface Library" . Instead they
suggested only creating Add-Ins ( Create mdb , create usysreginfo , create
forms , register it with add-in manager) .

There is a simple way doing it , create mdb , create forms , create module
as an interface to outside world .  Application want to reference that
library can just create a reference to it .  It is so simple that they
probably had missed it .

Thank you Alex . By coincidence , your comment had given me the answer to my
unanswered question . Could be wrong ..

so to all Access developers , who have only ms Access in their maschine
,this could be a good news - we can do the OO way .
Signature

Hermawih

> Hi Hermawih,
>
[quoted text clipped - 5 lines]
> I personally preffer to use VB6 to buld a DLL with library classes, and this
> is works fine at me for several years
Alex Dybenko - 05 Aug 2005 09:22 GMT
Hi Hermawih,
you are right, but the question is what do you mean with OO. If we talk
about classic OOP - then neither VB, nor Access fully support it - no
inheritance, no constructors, etc. but most important features are there...

Signature

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

> Alex Dybenko (MVP) wrote ,
>
[quoted text clipped - 55 lines]
>> this
>> is works fine at me for several years
Hermawih - 05 Aug 2005 11:26 GMT
Hello Alex ,
Yes you are right about that OO Classic things . I referred OO in Access as
OO in VB  .

Signature

Hermawih

> Hi Hermawih,
> you are right, but the question is what do you mean with OO. If we talk
[quoted text clipped - 60 lines]
> >> this
> >> is works fine at me for several years
Eelco Castelein - 18 Sep 2005 15:45 GMT
> Problems on rtf office 2003
>
[quoted text clipped - 76 lines]
> 2. http://groups-beta.google.com/group/comp.databases.ms-access
> 3. kb:240797
 
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.