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

Dynamic Year field in table

Status
Not open for further replies.

Ebes1099

Technical User
Jul 8, 2009
156
0
0
US
How can you create a field in a table that contains the year, but changes dynamically with the turn of the calendar? I've tried the now() function and that doesn't seem to work.

The premise of this is that I have a separate table that contains a year and a salary value, in the table I'm trying to get the dynamic year field in each row is a record of a worker and I want to pull over the salary for them based on the data in other table dependent on the year field.
 


hi,

What you describe is done in a QUERY, not in a table.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
And the expression you would use in the query to get the current year would use the year function and I would recommend the date function instead of now for this purpose....

Code:
Year(Date())

How you use this depends on the table(s) involved and what you are trying to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top