By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Set Default Value of Now() in a Memo Field

USTRAGNU1
P: 29
Hello,

I am trying to get the current date to display in a memo field (now Long Text) with a colon and a space after it so users don't have to type the date in before entering data.

So far, I have tested the default value of Now(). It appears in the memo field, but then disappears when I try to click after the date for data entry. Any suggestions for a fix would be greatly appreciated.

Thank you.

UTS
Dec 14 '17 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,186
USTRAGNU1:
It appears in the memo field, but then disappears when I try to click after the date for data entry.
Are you sure it disappears when you click? Or do you try to type when the whole value has been selected thus replacing that data with what you type? My experience is that this works fine unless you go into the control in such a way as to cause the existing data to be selected. Any typing at that point replaces the selection, as you'd expect.
Dec 14 '17 #2

USTRAGNU1
P: 29
I stand corrected. Not when I click, but when I press the space bar or try to type. Do I sort of need something in the Before Update event?
Dec 14 '17 #3

NeoPa
Expert Mod 15k+
P: 31,186
USTRAGNU1:
Do I sort of need something in the Before Update event?
That really depends on what you're after. If you want the user to click into the field properly like a competent human then what you have already should be fine.

See how I used the words "user" & "competent human" in the same sentence? It doesn't make much sense of course.

What you could consider, assuming allowing the users to make horrible mistakes is not part of the plan, is a separate (unbound) control that you allow users to enter new text into, as well as a bound control that doesn't allow editing for the original and updated text. In the {Control}_AfterUpdate() event of the unbound control put some code that adds this new text to the end of the original. Don't forget to make sure you dirty the form when you do that otherwise it may never get saved into the table.
Dec 15 '17 #4

USTRAGNU1
P: 29
LOL! Some users are ok! Thank you once again. I will give that a go.

UTS
Dec 18 '17 #5

NeoPa
Expert Mod 15k+
P: 31,186
I was being a little frivolous if I'm honest ;-)

Nevertheless, as developers we do have a responsibility to make our software as easy to use and hard to make mistakes with as is practical. Idiot-proof is often a good sign of well designed software.
Dec 18 '17 #6

Post your reply

Sign in to post your reply or Sign up for a free account.