Re: MakeTable Query -- Field Must be "Double" vs. "Decimal"

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 09/23/04


Date: Thu, 23 Sep 2004 21:47:32 +0800

Try:
    Total: CDbl(Nz([X] * 0.6 + [Y] * 0.4, 0))

That should return a Double type.

You will still need to open your table in design view, and set the Format to
Fixed and the Decimal Places to 3 if you want it displayed that way. (Note
that these settings only affect the way the data is displayed, not how it is
stored.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Tom" <anynomys@newsgroup.com> wrote in message
news:uDD0bHXoEHA.2636@TK2MSFTNGP09.phx.gbl...
> In a "MakeTable" query, I use an expression that calculates the following
> (sample):
>
> Total: ([X]*0.6+[Y]*0.4)
>
> When I execute the query, field "Total" always becomes a "Decimal" data
> type.
>
> Does anyone know how I modify the query to ensure the data type will 
> always
> be "Double" (3 decimals) for field "Total" (once the MakeTable query has
> been executed)? 


Relevant Pages

  • Re: mySQL Problem
    ... And when the query gets executed i get back the following error: ... near 'from, size, format, cat, host, link, date) VALUES ('bla', '-', ... directly into your mysql query browser...then execute it. ... practices', or, 'standards of practice'. ...
    (comp.lang.php)
  • Re: DateDiff bug?
    ... DatePaid is an unbound field on the form, Default value = Nowand format ... SQLStg = SQLStg & "FROM Member INNER JOIN Payments ON ... When I past the SQLStg into a query SQL, I can see it in Design ...
    (comp.databases.ms-access)
  • Telephone Number Format
    ... phone numbers without format. ... Query works fine if they are asked for in the displayed and ... would rather just key in the raw 10 digit sequence. ... I have changed the field definitions in the table design, ...
    (microsoft.public.access.queries)
  • RE: case sensitive join
    ... You could try going into Design View and either checking the format of the ... display) your records of that column in a uniform format. ... If you still get duplicate results, check your query results to see ...
    (microsoft.public.access.queries)
  • RE: Access 2007 mail merge
    ... Use a query which formats the date as the source for the merge. ... design view enter something like this in the 'field' row of a blank column: ... The Format function returns a string expression, ... from my database into my word document the date shows in numerical form. ...
    (microsoft.public.access.gettingstarted)