429 ActiveX component cant create object error

  • Thread starter Thread starter kelly d via AccessMonster.com
  • Start date Start date
K

kelly d via AccessMonster.com

my error is caused when I try to use the sample code on MSDN for RichTextBox
controls to add an image to my RichTextBox control. their sample goes like
this.

Private Sub cmdAddObject_Click()
' Add the butterfly bitmap to the control.
RichTextBox1.OLEObjects.Add , , , "bfly.gif"
End Sub

my code looks like this:

frm!CommonDialog.ShowOpen
f = frm!CommonDialog.Filename
frm!LetterWindow.OLEObjects.Add , , , f
(where LetterWindow is the name of my RichTextBox)

if possible to add images to a RichTextBox control in Access in this manner
or is that only a VB thing?
if it is possible, then does anybody know why I might be getting this error?

thanks
 
Hi Kelly,
if possible to add images to a RichTextBox control in Access in this manner
or is that only a VB thing?

Don't know. However, this KB article should be enough to convince you to
abandon the MS RichTextBox control:

ACC2000: Contents of Rich TextBox Control Not Viewable in Report
http://support.microsoft.com/?id=212733

While the title includes "ACC2000", I doubt that anything has changed in
this regard with either Access 2002 or 2003.

Have you tried using Stephen Lebans solution?
http://www.lebans.com/richtext.htm

I haven't tried Stephen's version because I have a licensed copy of all of
the FMS Access software, including Total Access Memo, available to me. You
might try it and see if it does the job for you.


Good Luck,

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

my error is caused when I try to use the sample code on MSDN for RichTextBox
controls to add an image to my RichTextBox control. their sample goes like
this.

Private Sub cmdAddObject_Click()
' Add the butterfly bitmap to the control.
RichTextBox1.OLEObjects.Add , , , "bfly.gif"
End Sub

my code looks like this:

frm!CommonDialog.ShowOpen
f = frm!CommonDialog.Filename
frm!LetterWindow.OLEObjects.Add , , , f
(where LetterWindow is the name of my RichTextBox)

if possible to add images to a RichTextBox control in Access in this manner
or is that only a VB thing?
if it is possible, then does anybody know why I might be getting this error?

thanks
 
Thanks for the reply tom.
yeah, I learned the hard way about RTB's not showing up in reports, so i made
a form that looks like a report. cant really tell the difference and it works
well. no prob there. had considered Lebans' RTF2. only probs I had were 1,
I'd have to either bundle the rtf2.ocx with my frontend and believe it or not,
none of my users would know what to do with a zip file or I'd have to install
it myself on all the machines that run the app now and in the future, which
isnt all that great of an idea and 2, when testing Lebans' RTF2, i couldnt
get the spacebar to work. bug? i dunno cuz it worked in his example .mdb, me
installing and registering it wrong, probably, but none-the-less, after
speaking with a random group of people that type, it's decided the spacebar
is important. (joke). So 2 negatives and no posatives (although I do love the
fact that the RTF2 control supports text highlighting) I think I'll have to
skip that solution for now.

thanks.
 
Hi Kelly,

For problem #1, you can create a setup.exe file, if you have the Developer's
version of Office (renamed "Microsoft Office Access 2003 Developer
Extensions" for Access 2003).

Regarding problem #2, why don't you post a new question asking about this?
If it works in the example, then I'm guessing that you did not implement it
correctly. In any case, Stephen would likely see your post and respond to it.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

Thanks for the reply tom.
yeah, I learned the hard way about RTB's not showing up in reports, so i made
a form that looks like a report. cant really tell the difference and it works
well. no prob there. had considered Lebans' RTF2. only probs I had were 1,
I'd have to either bundle the rtf2.ocx with my frontend and believe it or not,
none of my users would know what to do with a zip file or I'd have to install
it myself on all the machines that run the app now and in the future, which
isnt all that great of an idea and 2, when testing Lebans' RTF2, i couldnt
get the spacebar to work. bug? i dunno cuz it worked in his example .mdb, me
installing and registering it wrong, probably, but none-the-less, after
speaking with a random group of people that type, it's decided the spacebar
is important. (joke). So 2 negatives and no posatives (although I do love the
fact that the RTF2 control supports text highlighting) I think I'll have to
skip that solution for now.

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top