How do I lock the date and time in a memo field?

G

Guest

I have created a sub form in my main form where I want my employees to be
able to type notes after contacting a customer. The fields I have in the
subform are Serial Number (which I have tied to the serial number of the unit
on my main form to link the subform to the main form), Date/Time, Contact
Name, Subject, Note Entered By:, and a memo box for the notes. In the
Date/Time field in design view I typed =Now(). This Automatically entered the
current date and time. The problem is I cant get it to lock that date and
time so after the note is entered it does not change. For instance if I enter
a note today it puts in the current date and time which is what I want. But
if I open the record tomorrow. The date and time change to tommorows current
date and time instead of showing me the actual time and date that the note
was entered. Znyone have any idea how I can fix this?
 
R

Rob Parker

Subforms do not have fields. Subforms (and forms) have controls, which may
be bound to a field in an underlying table, possibly via a query. If you
have entered "=Now()" in the ControlSource for the control (textbox) in a
form, then the control is not bound to a field in the table; it is an
unbound control, and will always show the date/time at which the form's
records were loaded/refreshed.

Set the ControlSource of the textbox to the underlying field in the
table/query (which should be a field in the subform's recordsource). In the
table, set the default value for the field to Now(). This will set the
date/time value to the time when the record in the table created.

HTH,

Rob
 
G

Guest

Sounds like the data/time field is unbound. In other words it is not linked
to a table.

In the Properties for the text box in question, go to the Data tab. The
Control Source should be the name of a field in a table or query.

In the Default Value you should have the =Now() . Actually I prefer to have
default values in the table instead of the form.
 
G

Guest

Presumably you want the date / time to be loaded as of the date / time of
creation of the record.

I routinely do what you are trying to do with no problems. Just double
checking, it's to enter "=date()" or "=now()" as the default value for that
field in table design. I usually use a text field, but I did a test and
it also works in a date/time field.

Don't know if that helps.....hope so.

Fred
 

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

Top