×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Editing a Memo field using a TextBox

Editing a Memo field using a TextBox

Editing a Memo field using a TextBox

(OP)
Dear Team!

Is it possible to edit a Memo field using a text box. I have a field for email id which is Memo. I want to give access to this field on a form using a TextBox keeping the field as its control source. But, I am getting 'memo' written in the text box and I am not able to edit it.

Any Idea?

Thanks,
Rajesh

RE: Editing a Memo field using a TextBox

Use an edit box instead. If you want it to look like a textbox, size it appropriately and turn off the scrollbars.

RE: Editing a Memo field using a TextBox

I agree with Dan. A text box is intended for relatively short pieces of text, such as names, addresses, amounts, dates, etc. An edit box is intended for text of any length - just like a memo field.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Editing a Memo field using a TextBox

Rajesh,
One other thing to consider, is an OLERTF control, if you want to be able to edit text as rich text (color, font, font properties like bold, italic, etc. You may not need all that this time, but it does make for much nicer looking applications. I've started replacing edit boxes with these.

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: Editing a Memo field using a TextBox

Memo is unusual for a mail address. The core address has a length limit anyway, the only part of a mail address, which could be longer is the part in <>, eg as in "olafd@somewhere.com <Olaf Doschke>"

Because of that the Address could be longer than the longest CHAR(254) field you can define in a DBF, but if that's not even part of your email values, the simplest is to change the field type.

You can only bind a column in a brows or grid to a memo and a double click then pops up a memo edit window. The textbox itself will only display "memo" for empty fields and "Memo" with capital M for memo fields with value. That's how memos show up in a Browse by default and that's why it doesn't work in a single textbox, the double click is not popping up an edit window, if I try that mself.

So when you stay with Memo, as your tables are defined that way and you can't change it, then you need to use an editbox, as others already said.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Editing a Memo field using a TextBox

I always use memo for email addresses and URLs and anything else like that. I don't want to worry about how long they might be.

For email, it appears 254 max. I'd rather use a memo than a 254-char field.

Tamar

RE: Editing a Memo field using a TextBox

Agree with Tamar on that 100%.
I also use memo's to hold directory and file names stored locally.

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: Editing a Memo field using a TextBox

Do you know anyone with such a long mail address? I agree a long char field most often is a waste, and as wrong as the 254 instead of 256 char limit is - a memo is more practical even sooner - but either I have a server backend with real varchar fields or it's not that many records I'd worry much about it. Also, autocomplete is nice, especially if you split mail address entry into the two parts.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Editing a Memo field using a TextBox

(OP)
Thank you dear Dan for your suggestion.

Thanks to Mike, Scott, Olaf & Tamar for your time and inputs.

I think I would go for an edit box as changing the filed type may not be a possible option.
Too, as Tamar said I need not worry about the length even while I completely agree with Olaf that its very very rare that someone has an email id of around 200 characters!

Thank you all,
Rajesh

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close