Link to home
Start Free TrialLog in
Avatar of snyperj
snyperjFlag for United States of America

asked on

Pass Through Query to SQL Server displays currency when it isn't currency

Using a pass through query in access I am pulling data from a SQL Server view.  

On the access side, it is converting several fields to currency automatically when it displays the data.  It also formats it to two decimal places.

The view in SQL shows all values to four decimal places which is how I would like it to display in Access.

So in other words, a value in the view is 0.8169 but Access displays it as $0.82

Is there anything I can do to have the Access display retain the sql view format?   Thanks.
Avatar of danishani
danishani
Flag of United States of America image

Change the Decimal places from Auto to 4.

Hope this helps,
Daniel
Avatar of snyperj

ASKER

Change it where?
danishani means in the "edit" of the table, for each field changing the decimals property to 4 instead of "auto" that sets the decimals automatically depending on the datatype it believes it is
so you can also change the property of the datatype to say it is decimal, float, single whatever you might need
what i don't have right now is access installed here so I cannot test if that works ok on a passthrough table from ms sql, but I think it does, just open the table in design mode and change the properties
Yup but then I realized you are u using SQL server, try to change the Format of the Field in your Form or Query and set Decimal places to 4.

Would that help?
Avatar of snyperj

ASKER

I can't edit the table in SQL server and a pass through query in access has no interface from which to edit format that I am aware of (thus the question.)

I guess I was looking for some help with applying some formatting to the view on the SQL side that may force Access to interpret the values differently than it is, which as currency.  Currency they are not.  

I know I can probably create a new query in access with the pass through as the underlying record source and apply formatting from there.... I was just thinking that there was a better way.
ASKER CERTIFIED SOLUTION
Avatar of danishani
danishani
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