Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting default value of a field

Status
Not open for further replies.

leeroi

Technical User
Jun 5, 2000
122
US
Good morning,

Is it possible to set the default value for a field which is the result of an expression? For example, suppose I have two date fields Date1 and Date2. I want Date 2 to equal Date1 plus 3 months. In table design view, I tried this by entering the following as the default value for Date2: [date1] + 90. Access tells me it doesn't recognize the variable Date1.

Lee
 
You probably don't need to include a calculation like this in a table.

Instead, define a query using the table, and add a calculated column to the query.

Then, base forms, reports, other queries off the query.
 
Thanks,

I've used the query route in the past. I was just curious whether this could be done within the table.

Lee
 
Not that I know of. I don't believe you can get to information from another field in a table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top