472,362 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,362 software developers and data experts.

Overriding a Date/Time stamp, and then Resetting it

Hi - I am using a Date/Time Picker popup form for users to choose a a
date and time for use on a separate entry form. The date/time on the
entry form is actually entered automatically as a date/time stamp when
a user enters a record. So, the popup form is only necessary when a
user needs to change the date/time.

To make this more user-friendly...there will be times when a user will
be away from the computer, and therefore, will have to later enter a
bunch of back-dated records in one sitting. When a user picks an
older date/time from the picker, is there a way to temporarily store
that value and use it for all the new records he/she enters in that
sitting; while the entry form is open (single form view). Then, if
the user closes and reopens the form, or simply clicks a button
somewhere to reset the date/time, the date/time stamp would be reset
to the machine's current date/time.

I hope this makes sense.
Thank you.
Jun 27 '08 #1
1 1992
I'm posting a solution to my own problem--just one way I suppose...

In the subform that contains the date & time stamp field, I added an
unbound textbox named txtDate to store a separate, hidden date value
with the default value of Now(). If the user double-clicks on the
regular date/time field named InterventionDateTime and picks an
earlier date from the popup mini date/time picker, then this will
occur on the beforeupdate of the subform:

If Me.txtDate Me.InterventionDateTime Then
If MsgBox("Do you want to use this 'past' date as the" & Chr(13) +
Chr(10) _
& "default date for new interventions entered this session?", vbYesNo)
= vbYes Then
InterventionDateTime.DefaultValue = "#" & InterventionDateTime & "#"
Me.Parent.cmdResetDateTime.Visible = True
Else
InterventionDateTime.DefaultValue = "#" & Now() & "#"
End If
End If

On the main form, I added a cmdbutton named cmdResetDateTime that,
when clicked, will reset the date to "#" & Now() & "#".

Lastly, on the mainform's open event, I also reset the default value
of the subform's date field to "#" & Now() & "#".
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Don | last post by:
Hi all, With regards to the following, how do I append the datetimestamp to the filenames in the form? The files are processed using the PHP script that follows below. Thanks in advance,...
6
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital...
5
by: Des | last post by:
I have to do an events calender for a church. The events display will be limited to that week. If someone went in today Wed 24th I want to display 21st to 27th. I dont want any code samples, just...
3
by: phried1 | last post by:
I have created a form and inserted the following tables: Date Entered Time Entered Date Modified Time Modified Essentially how and where can I have these dates and times recorded so when the...
1
by: Susan Bricker | last post by:
Greetings. I have a report (actually all of my reports in an MDB) that I want to date/time stamp at the bottom. Previously, I had used the builtin function of Now(). I thought that would give...
8
by: Trev | last post by:
Hi Can anyone point me in the right direction here, I would like to open a table in access 2003 by date. I have an asp web page which needs to read data from a table with each days today's date...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
10
by: r035198x | last post by:
The Object class has five non final methods namely equals, hashCode, toString, clone, and finalize. These were designed to be overridden according to specific general contracts. Other classes that...
16
by: W. eWatson | last post by:
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.