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

Hold date in form.

Status
Not open for further replies.

JudyT

MIS
Oct 23, 2002
1
US
Entering multiple tickets with the same date. Would like to know if there is a way for Access to continue to display the last date entered until overwritten with new date?
Thanks.
 
Create a global variable to hold the value:

In Modules tab of Database window, create a new module called Globals and then, at top enter code:

Public DtHold as Date

Then, in the form's On Current event add code

Me!DateField = DtHold

and

in the form's On Change, add the code

DtHold = Me!Datefield.


You may also be able to do something like this with an unbound hidden field on the form instead of the global variable. You may also have to play with choices of events to get it to work just the way you want it to.
 
Could you do that with something other than the date?? Say a control number. Instead of flipping back through to see the last control number entered.
 
I believe you could do it with anything. However, your statement about wanting to see the last control number sounds like you then want to add 1 to it to create a new control number. Having done this with member numbers, I would suggest some kind of code should be added to automatically generate the next control number.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top