MS Access

B

bwalters

In design view, I am trying to use the variable contents one one field to use
as the default data in another field w/in the same table. I am trying to use
the DateAdd Function in this way..."DateAdd(d,135,[Field Name])" (The
parenthesis are not part of the function). I get back that it doesn't find
the Field Name. Any ideas...?
 
D

Duane Hookom

Within a table design, you can't set a field's default value to an
expression involving another field.

You can create some functionality in a form that might work for you.
 
B

bwalters

Duane...Thank you for your reply to my question. Would you be willing to
elaborate on the form design thing. Being new to Access, I thought the answer
might be in the form design, but it only brought more questions about how on
a form I could get a field to display without actually having any data in the
field I wanted to display. In this case that would be the field I wanted to
use the DateAdd() in. Anyway, Thank You again for the reply. I appreciate any
assitance.

Duane Hookom said:
Within a table design, you can't set a field's default value to an
expression involving another field.

You can create some functionality in a form that might work for you.

--
Duane Hookom
MS Access MVP
--

bwalters said:
In design view, I am trying to use the variable contents one one field to
use
as the default data in another field w/in the same table. I am trying to
use
the DateAdd Function in this way..."DateAdd(d,135,[Field Name])" (The
parenthesis are not part of the function). I get back that it doesn't find
the Field Name. Any ideas...?
 
D

Duane Hookom

If you don't want to field to display then apparently you don't intend to
change its value from anything other than 135 days into the future. If this
is the case, remove the field from your table since it isn't necessary.

If you intend to edit the field later, you can use code in the after update
event (code module) of one control to set the value of another control to
135 days later.

--
Duane Hookom
MS Access MVP


bwalters said:
Duane...Thank you for your reply to my question. Would you be willing to
elaborate on the form design thing. Being new to Access, I thought the
answer
might be in the form design, but it only brought more questions about how
on
a form I could get a field to display without actually having any data in
the
field I wanted to display. In this case that would be the field I wanted
to
use the DateAdd() in. Anyway, Thank You again for the reply. I appreciate
any
assitance.

Duane Hookom said:
Within a table design, you can't set a field's default value to an
expression involving another field.

You can create some functionality in a form that might work for you.

--
Duane Hookom
MS Access MVP
--

bwalters said:
In design view, I am trying to use the variable contents one one field
to
use
as the default data in another field w/in the same table. I am trying
to
use
the DateAdd Function in this way..."DateAdd(d,135,[Field Name])" (The
parenthesis are not part of the function). I get back that it doesn't
find
the Field Name. Any ideas...?
 

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