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

Date Incrementation 1

Status
Not open for further replies.

qwert85103

Technical User
Dec 27, 2003
162
US
hi,

I am posting this again, since the people who replied before left it without completing it :-( My problem still remains unsolved.

Anyway we are all busy..I understand, I am repeating my question again:-

I have a date field in a form. What do I do so that when a user completes one record and moves on to next record, the date should automatically increment by 1 (meaning whatever the date the user had input in the last record, it should increment that date automatically by 1 for the next record).

I would appreciate your suggestions.

thanks in advance for your help.

 
qwert85103

Try this and see if it does it for you...

On the AfterUpdate event for your Date field, put
Code:
Me.YourDateField.DefaultValue = """" & Me.YourDateField.Value + 1 & """"

The above is all one line.

Another approach would be to carry the previous value forward in the Tag property, but the above should do it.

Tom
 
As for the last thread, how are we supposed to assist without knowing what error, what didn't work, where did you place the code... faq181-2886 addresses how to get the best answers (#14 is relevant, though the whole faq is worth a read). We can't see your setup from where we are...;-)

Roy-Vidar
 
RoyVidar,

I mentioned that I placed the code at form level. But I didn't go into details..my fault..sorry!

but anyway thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top