DATE Projections

R

Rpettis31

I have a form that prefills dates upon creation. For example the date().
Fills in the date. There is a projected due date on the form =date()+7. The
initial dates save in the table and I would like when someone reviews the
form that the date in the table is displayed not the current date. I am
assuming it based in some way on an if statement if the table field value was
null! however, I am not sure how I would do this.



Thanks
Robert
 
M

mscertified

Just bind the control on the form to the column in your table.
In table design for the date column set the default to '=Date'.

-Dorian
 
R

Rpettis31

I have the form bound to the field in the table.
The value of the table is set to =date()

The original date enter is retained in the table, my issue is that the date
in the table does not appear when the form displaying a record for review.
 
J

John W. Vinson

I have the form bound to the field in the table.
The value of the table is set to =date()

The original date enter is retained in the table, my issue is that the date
in the table does not appear when the form displaying a record for review.


I think you're confusing the *field in the table* with *a control on the
form*. They are different! The value of the table CANNOT be set to =Date();
table fields cannot contain functions or expressions. I suspect that you
instead have a Form Control with a Control Source of =Date(). This value will
be displayed but will NOT be stored in the table.

What you can do instead is have the form control with a control source of the
fieldname in the table (which, by the way, should NOT be the reserved word
Date); you can set the Default Value property of the form control to =Date()
to automatically fill in today's date at the moment the record is created.
 
J

John W. Vinson

Why do you have to bind this field to a control on a form after all, if all
you need is to assign the current date to this field?

I presumed that the OP wanted to see the value on the form. If not, then
you're quite correct.
 

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