Change Date By Macro or Code Leaving Only One Record

A

Ange Kappas

Hi,
I have a table called RUNDATE which has only one record in the date
which my whole program looks at as the running date. I would like to run a
Macro on a form or a Code upon which once I press it that single date in
that table to change to the next day, lets say from 3/5/07 to 4/5/07 to
delete the previous record of the 3/5/07 and to be left only with one record
with the new date in this case lets say 4/5/07.

Much Appreciated
 
N

NetworkTrade

make a query of this single record table field - and then put that query into
your form as a subform.....you can keep it not visible if you wish.....but
then it is there for you to be able to increment the date.

On whatever button or event you use to increment the date put:

Me.SubformName.Form!DateFieldname=Me.SubformName.Form!DateFieldname+1

be sure that date field is formatted as a date field....
 

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