formating a date entered in one column to appear as a wk num in ne

M

mrbeepa

I have a table which contains a date column called installDate in the next
column I want the date to appear as the week of the year that would be, that
column is called weekNum. I have been trying to accomplish this in various
ways. The date column is ofcourse a date data type but I'm not sure which
data type the weekNum should be. I have been using the following formula in
various fields of weekNum, including the format field and the default value
field.

=FormatDateTime([installDate],"ww")

When I use this code I get an error:
The database engine does not recognize either the field 'installDate' in a
validation expression, or the default value in the table 'Contracts'. (Which
is the name of my table)

Any help would be greatly appreciated!
 
T

Tammy F

I think you have to run an update query on the table in order to get what you
are looking for. Or if you input data into a form you can use that formula to
update the field in the table. But - the tables themselves aren't really for
data entry per se... you can't do anything fancy in them. (Such as formulas.)
Tammy
 
M

mrbeepa

Thank you Tammy F, I appreciate the response. I will try using this in a
query instead. That will work for what I'm tryin to do.

Tammy F said:
I think you have to run an update query on the table in order to get what you
are looking for. Or if you input data into a form you can use that formula to
update the field in the table. But - the tables themselves aren't really for
data entry per se... you can't do anything fancy in them. (Such as formulas.)
Tammy

mrbeepa said:
I have a table which contains a date column called installDate in the next
column I want the date to appear as the week of the year that would be, that
column is called weekNum. I have been trying to accomplish this in various
ways. The date column is ofcourse a date data type but I'm not sure which
data type the weekNum should be. I have been using the following formula in
various fields of weekNum, including the format field and the default value
field.

=FormatDateTime([installDate],"ww")

When I use this code I get an error:
The database engine does not recognize either the field 'installDate' in a
validation expression, or the default value in the table 'Contracts'. (Which
is the name of my table)

Any help would be greatly appreciated!
 

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