Link to home
Start Free TrialLog in
Avatar of JCJG
JCJG

asked on

Access 2007 Make Table query number format

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.
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

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
Avatar of 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.  
ASKER CERTIFIED SOLUTION
Avatar of Andrew_Webster
Andrew_Webster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JCJG
JCJG

ASKER

I am not getting a workable solution
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

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.
Starting auto-close process to implement the recommendations of the participating Expert(s).
 
modus_operandi
EE Admin