Formatting question - make table query

S

SmartCookie

Hi - I'm not really a superuser by any means, but have been doing
queries and reports from Access for about 8 years. I'm stuck on a
problem though.

I'm reporting from our Accounting database which is new to me, and
there is a field called [glamnt] which is currency and another field
called [credit] which is a yes or no field showing up as 0 or -1.

I created two new columns in my make-table query with the following
expressions.

Dr: IIf([credit]=0,[glamnt],"")

Cr: IIf([credit]=-1,[glamnt],"")

I am getting the results I need, but am unable to format the numbers to
currency.

I can go to the table after I run the query and change it to Currency,
but I don't want to have to do that every time I run this report.
(This report is intended to be used company wide at will.)

Thanks so much for your help. ( I tried to search the group for an
answer, but was stumped on how to even search for this. )

Michelle Boggs
Cincinnati USA Regional Chamber
(e-mail address removed)
 
D

Duane Hookom

You are forcing a zero-length-string into a field which can only create a
text field. You might want to change your expression to something like:
Dr: IIf([credit]=0,[glamnt],0)
This might also work
Dr: IIf([credit]=0,[glamnt],Null)
 
S

SmartCookie

Thank you so much! Duhhhh! Now that you've told me the answer, I
can't believe I didn't see it. Thank you, thank you! I tried your
fix and it worked perfectly. Michelle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top