Hi!
I am using the code below to export a file from Access to Excel. There are two columns that are set to Yes/No format and the lookup setting is set to Textbox. All looks well until I export it. At that point the Yes/No is changed to True/False. The user wants Yes/No. This happens even when I manually export it and click the option to maintain formatting. Is there any way to correct this?
Thanks!
Leesha
'Exports reports to be attached to email
DoCmd.OutputTo acQuery, "qryContactInformation", acFormatXLSX, "C:\Walmart\OutputFiles\qryContactInformation.xlsx"
Format Change on Export
-
- Administrator
- Posts: 76156
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Format Change on Export
The export transfers the actual value of the Yes/No fields.
Instead of including the Yes/No fields themselves in the query. create columns like this:
Format([FieldName],"Yes/No")
These will be exported as text values.
Instead of including the Yes/No fields themselves in the query. create columns like this:
Format([FieldName],"Yes/No")
These will be exported as text values.
Regards,
Hans
Hans
-
- BronzeLounger
- Posts: 1441
- Joined: 05 Feb 2010, 22:25
Re: Format Change on Export
Good to know! Thanks Hans, it worked perfectly!
Leesha
Leesha