Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Yes/No Fields to Excel 3

Status
Not open for further replies.

byrne1

Programmer
Aug 7, 2001
415
US
I can export a report to Excel just fine but the yes/no fields in the report are not being exported (every other field goes OK but not the yes/no fields).

Is there a way to export this data to Excel?
 
What would you like to see in the Excel file? You can't export a check box (that I am aware of) but you can export -1/0 or Yes/No or True/False or any other values you want. You might need to use a query rather than exporting a table.

Duane
MS Access MVP
 
Can I join in on your side of this query Byrne1?

I want to use Yes/No to return 1/0 for a calculation (Value = Value*[Yes/No]) but I can't seem to find out how. From your response, dhookom, it sounds like it's very easy & I'm being very dim.
Thanks in advance for showing me just how dim witted I am.

 
A yes/no field stores a -1 for yes and 0 for no. You can use a query to export to Excel. The query can use a calculated field like:
YNFldA: IIf([YNField],"Value Is Yes", "Value Is No")
or if you want to do math:
QtyIfYes:[Qty] * Abs([YNField])

Duane
MS Access MVP
 
Many thanks Duane, that was quick!
So far everything I've done has refused to accept Y/N as numeric, I'll let you know how it works.

Are you any good with Relationships? I've got a query on that Forum about creating & picking up static data which nobody seems to want to respond to. Maybe I'm not being clear enough.
Many thanks again

 
A Yes/No field is numeric. The only possible gotcha is that it could be null.

Duane
MS Access MVP
 
Thank you Duane! I used a Val() formula in my query to indicate yes/no w/ a 0/-1 instead of a checkbox and this resolved my problem.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top