I get the "#Error" in Preview and Print when i do simple formatting to report fields.

llyal

Registered User.
Local time
Today, 11:30
Joined
Feb 1, 2000
Messages
72
New at making reports, having problems.

I get the "#Error" in Preview and Print when i do simple formatting to report fields.

Example, I have a report field associated with a date/time field in a table (with a typical date 3/06/2000); I get the "#Error" when i put this code in the report field's Control Source property "=Format([Field]), "yyyy")".

Example 2, I have a report field associated with a number field in a table (with a typical number "0.3"); i get the "#Error" when i put this code in the field's Control Source, "=Format([Field], "0.00").

I first thought the associated table's field datatype had something to do with it, but this is not the problem; is there some kind of "black magic" i have to do to make Access perform?

Thank you!

Llyal
 
I believe the only way to extract part of a field is to write the expression in a query, i.e., =Datepart("yyyy", [field]). This will extract the year from your date field. Run your report from the query instead of trying to put the expressions directly on the report.
 

Users who are viewing this thread

Back
Top Bottom