Default Value of field in form

D

Dazed And Confused

Hi all.
We have a very simple form that our folks use to enter payments into a
table called tblPayments. The table and form fields are CustomerID,
DatePaid, DateDue, and AmountPaid. Very basic.
We want the "default" value in the DateDue field on the form to
display a date exactly 1 month in the future from the DatePaid. This
way when people enter payments, the next due date will be
automatically populated.
We do want the users to be able to override that 1 month ahead Due
Date if they have circumstances that warrant it.
We have tried setting the default value of the DateDue in the table to
one month ahead by using DateAdd in the Default property and we tried
setting the Default value in the DueDate textbox on the form. Neither
work.
Can what we want even be done? Whats the best way?
Any help you can give is greatly appreciated.
Thanks
GB
 
L

Linq Adams via AccessMonster.com

The Default Value is placed at the moment a new record is created. If I read
your post correctly, DataPaid would not be entered at this point. Try this:

Private Sub DatePaid_AfterUpdate()
Me.DateDue = DateAdd("m", 1, Me.DatePaid)
End Sub
 

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