I am developing an Access application that utilizes the "Format" function here and there in VBA code. The code works perfectly on my machine.
When I load the database on my co-workers machine, it fails on every instance of the Format function - error: Can't find project or library...
You can use the query method or still use the recordset method - your choice. To get an accurate record count from the recordset, use the .MoveLast method first. Then the recordcount property will be accurate.
I don't know of a way to do this directly from the table. Maybe someone else has already figured this out and can help.
Exporting directly from tables is a lot less flexible than working in queries. I tried messing around a lot with the table field formats with no success before I moved to...
Are you exporting from a query window? Here is a sample statement I use a lot:
Current Rate: Format([cur_rate],"0.000")
This exports the field with three decimal places. Use "0.00" for two decimal places. I hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.