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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating Form field with time from computer clock?

Status
Not open for further replies.

JoetheSousChef

Technical User
Nov 15, 2003
4
0
0
GB
Greetings All!

We have a simple Access Table filled with data from an Access Form. Two of the fields are "Start Time" and "Stop Time". These fields are formatted Date/Time.

We want to link these fields to the computer's clock so they will update automatically until we "freeze" them.

Access will not let use "=Now()" saying that it is the wrong data for the format.

Two questions:
Is there a way to link the "Start Time" field to the computer's clock? (As you can see I would have used
=Now() )

Is there a way to "freeze" the linkage once we have started. (I use Copy, Edit Paste Special Value in Excel)

Many thanks in advance for your advice and knowledge.

Joe



 
You can use the FORMAT() function around the =Now() to change the format to a format that your table will accept.

I'm not sure what you mean by "freeze the linkage" though?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
JoetheSousChef . . .

In the forms [blue]Timer[/blue] event try:
Code:
[blue]"Me![Start Time] = Format(Now(),"Hh:Nn")[/blue]
Set the [blue]Timer Interval[/blue] to your liking . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top