Hi, I am creating a make-table query with a number field. I'd like the number field with 4 decimal places in the output table. How do I do that? Thanks.
SQL
Last Comment
modus_operandi
8/22/2022 - Mon
MINDSUPERB
In design view of a Make Table Query use a Format function of the column you want to format:
E.g. Account1:Format([Account],"0.0000")
Sincerely,
Ed
peter57r
I don't think you can do this within the make-table query.
Mindsuperb's answer will create a text field, not a number field, although the results for the current data will show with 4 dp in that text field.
I agree that the poster is not getting a workable solution.
That is because, as I said in my response, it can't be done in the way they are asking.
Andrew Weir gave an approach that is can be used to carry out the poster's requirements.
The table must be defined in advance and an append query used, or the table must be modified in code to set the number of decimal places.
Another code example.
CurrentDb.TableDefs("<tblname>").Fields("<fldname>").Properties("DecimalPlaces") = 4
Andrew_Webster
Thanks Peter, that's exactly right.
JCJG, there is no magic way to do this, it's going to take several steps to make sure that it works as you want it to. I've had to build solutions for problems like this many times, and it's exactly as Peter and I have described.
modus_operandi
Starting auto-close process to implement the recommendations of the participating Expert(s).
E.g. Account1:Format([Account],
Sincerely,
Ed