Solved

How to get MakeTable query to create Currency fields?

Posted on 2013-06-07
5
258 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now