Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Notepad (or something) to form to edit memo field

Status
Not open for further replies.

dethomson

MIS
Jun 15, 2003
5
US
I have a table that has data stored in a memo field. I'd like to add some sort of editor (Notepad, WordPad, ...) to the a form that can be used to edit the data stored in the memo field.

I've seen things kicked around about the Rich Text control and the sort, but haven't come across the actual code.

Any guidance is greatly appreciated.

I'm working in Access 2000.
 
Use a standard text box but enable scroll bars (and make it a bit bigger)
 
Aren't text boxes are limited to 255 characters in length ? What I'm storing is a lot larger than that (but still smaller than the memo field limit). I am currently using a memo field in my table. I would like to be able to include some functionality in my form to allow the user the ability to do some editing.
 
As you've noted, there's always the rich text control, but I haven't been able to use it because unfortunately, my users do not have admin rights on their workstations and therefore the contol can't be registered. The only way to make it work is to convince the IS group that its a good thing to push an upgrade out to all users that includes the registered rich text control.

So far, no luck. Something to think about though.

Now, I haven't tried this, but I've done something similar with Visio files.

I have a client who wants to add "schedules" to his "Issues" database. He used Visio to creates a template. I then copied it and made several templates. 1 month, 3 month 6 month, 1 year, 2 years.

I then stored these templates in a table and used another field in the table as a "description" of each template.

I made a popup form that displays the templates in a continuous form. I added a button (shows up on each record) that pastes the selected template into the Issue record from which the popup was launched.

I used a Bound OLE type field. I set the "verb" property to 2. That means that when you double click the object, it opens up the native application - in this case Visio - and allows you to edit.

Another thing to remember is to set the Size Mode property to Stretch and Display Type property to Content.

So how does all this relate to your situation? Well, I'm thinking you could store an empty Word document in a table, and then either -

a) always insert a copy of that empty word document into an OLE field on your form, or

b) provide a button to insert a copy of the empty word document if/when the user wants to enter some text.

My guess is that unless you make the bound object pretty big, it won't look like a regular memo field, but the user can open it in word and edit it by double clicking it.

I provided 3 buttons: [Insert], [Edit], and [Delete]

Insert just uses the Me.OLEBound7.SetFocus and RunCommand acCmdPaste

Delete just uses "Me.OLEBound7= Null

Edit uses:
On Error Resume Next
Me.OLEBound7.Action = acOLEActivate

The On Error Resume Next prevents an error if there is no object to activate.

If you try this and it doesn't work, let me know and I'll see if I can come up with something that works.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top