Default Values

  • Thread starter Thread starter A. Hatheway
  • Start date Start date
A

A. Hatheway

I have a very simple form. It has a member ID, a date, an amount
contributed, etc in that order.

How can I get the default value for the date to be the date last entered (on
the record before)? In other words, as I go from record to record, I want
the date to stay the same unless I change it.

Can anyone help?
 
A. Hatheway said:
I have a very simple form. It has a member ID, a date, an amount
contributed, etc in that order.

How can I get the default value for the date to be the date last
entered (on the record before)? In other words, as I go from record
to record, I want the date to stay the same unless I change it.

Can anyone help?

In the AfterUpdate event of DateLastEntered:

Private Sub DateLastEntered_AfterUpdate()

With Me!DateLastEntered
.DefaultValue = Format(.Value, "\#mm/dd/yyyy\#")
End With

End Sub
 
Thank you very, very, much. It works great!


Dirk Goldgar said:
In the AfterUpdate event of DateLastEntered:

Private Sub DateLastEntered_AfterUpdate()

With Me!DateLastEntered
.DefaultValue = Format(.Value, "\#mm/dd/yyyy\#")
End With

End Sub

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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

Similar Threads

Carry over date from previous record 1
Default Value 7
Access Dcount function in access 0
how to add day in the next record 2
Default Values in subforms 3
New Record 4
Default Value as last date in a table? 5
Sum a field in a form 1

Back
Top