Share via

Undefined function "format" in expression

Anonymous
2019-06-06T09:03:48+00:00

Hi,

I am using this query in my newly installed access database and getting the error as given in the subject line. This query was working fine in the old access database. Would you please advise me what is wrong with it. Same query is working on other laptops. I have checked trust center settings and all look ok. Please advise me.

Thanks for your help.

SELECT FirstDate, LastDate, LocationID_From, Destination, Movement_Type, Grade_Category, Format([CR_Tones],'#,0.00') as Tones, Format([Cr_Ounces],'#,0.00') as Ounces, Format([CR_Grade],'#,0.00') as Grade

From QRY_ProdDailyCrushedMaterialByDate_Mat

UNION SELECT 'Total' as FistDate, 'Total' as LastDate, 'Total' as LocationID_From, 'Total' as Destination, 'Total' As Movement_Type, 'Total' As Grade_Category, Format([CR_Tones],'#,0.00') as Tones, Format([Cr_Ounces],'#,0.00') as Ounces, Format([CR_Grade],'#,0.00') as Grade

From QRY_ProdDailyCrushedMaterialByDate_Total;

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2019-06-06T10:15:08+00:00

    Go to - in the VB editor - menu Tools, References.

    One or more reference is probably marked: MISSING.

    Sort this out, and you won't see the error.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-06-06T09:25:55+00:00

    Hi,

    try with  Format([CR_Tones],"#,0.00") as Tones

    use " instead '

    Ciao Mimmo

    Was this answer helpful?

    0 comments No comments