Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to get MakeTable query to create Currency fields?

Posted on 2013-06-07
5
269 Views
Last Modified: 2013-06-07
Hello - I would like the table resulting from a summary MakeTable query to create the amount fields with the Currency data type, rather than Double.

(The MakeTable query is based on a cross-tab query, so I can't depend on the number of columns. Otherwise, I'd use an Append query into a table that already has Currency fields.

Is there a way to do this?
0
Comment
Question by:mlagrange
  • 2
  • 2
5 Comments
 

Author Comment

by:mlagrange
ID: 39229582
I thought I could work up a Data Definition query to change the data types, but I got the impression from looking for examples that you can't change data type with ALTER. Is that right?
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 39229640
It would be useful if you could post a (sanitized) sample database.

Off the top of my head, I would try modifying the cross-tab query so that instead of taking Sum([ColumnName]) it takes Sum(CCur([ColumnName]))...
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 39229697
<<<<<I thought I could work up a Data Definition query to change the data types, but I got the impression from looking for examples that you can't change data type with ALTER. Is that right?>>>>>


ALTER TABLE table_name MODIFY column_name column_type;


ET
0
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 500 total points
ID: 39229714
Also, try this ...

ALTER TABLE [table_name] ALTER COLUMN [column_name] CURRENCY;


ET
0
 

Author Closing Comment

by:mlagrange
ID: 39229780
That's it!

Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question