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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to assign a default value into a field from data in another table? 1

Status
Not open for further replies.

dataplayer

Programmer
Jan 11, 2003
95
US
In my data entry form, there is a field called "Year" where I want a current year value from another table or query as the default. It should not be difficult I feel, but I just don't know how. Could anyone enlighten me. Thanks.
 
dataplayer,

In the default value of your field year simply use a

dlookup("[yourYearField]","yourTableOrQueryWithYear")

where you replace yourYearField with the name of the field containing the year you wish to use and yourTableOrQueryWithYear with the name of the table or query you wish to use. As there is no criteria this will select the first match.

Mordja

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top