Exporting a Query to a Tab Delimited Text File

jcbhydro

Registered User.
Local time
Today, 11:38
Joined
Jul 26, 2013
Messages
187
Good Morning Folks,

I am able to successfully export data from an Access 2010 Query to a Tab Delimited Text file without difficulty.
My problem is that the Query includes several 'tick boxes'. The resulting text file shows the text boxes as 1 or 0 as appropriate. What I actually require is a Y/N result.
To achieve the required Y/N result requires some fiddly find and replace editing which is complicated by the fact that the query also contains telephone numbers incorporating 1 & 0, This then requires further editing of individual records to convert misplaced Y/N back to 1/0.

Is their any way that one can force the export to convert text boxes to Y/N rather than 1/0.

Any advice on this point would be much appreciated.

jcbhydro
 
How about using a Iif(YourCheckBox,"Y","N")
 
Namliam,

Thank you for your rapid response to my query.

Sadly, I don't have the faintest idea of the meaning of your suggestion!
I have never come across the term 'lif' previously. I assume that it is an abbreviation for some procedure implemented in building the query.

Any further comment would be appreciated.

jcbhydro
 
The Iif is a inline IF statement inside a query, you can simply copy paste the IIF into a query like a field and you should be good. Just remember to replace "YourCheckBox" by the proper column name :)
 
Namliam,

I now recognize the IIF function and the logic of the suggested expression.

I assumed that I should incorporate the expression IIF([eNewsletterr],"Y","N") as a 'criteria' in an additional column in the Query Design View, but what do I use as a column heading?
Also, do I need a separate additional column for each of several Checkbox fields or can I use an AND function to include all checkbox fields in one statement?

An appreciative jcbhydro
 
You would basicaly need seperate columns for each possible checkbox,

As for column heading, you automagicaly get one assigned which probably would be Expr1
YourColumnHeader: Iif(...)

YourColumnHeader by default (as I said) would be Expr1, Expr2 etc. But you can change it to what ever you like.
 
I am obviously doing something incorrwctly as I cannot get the suggested criteria to function; If I detail the structure of my query perhaps you could suggest where I am going wrong'

The 6 columns of my query are: E-Mail, First name, Last Name:Surname, eNewsletter:e-NEWS List, SO:Subs SO, Leader:Leader of Group.
All fields are derived from a main Table Mail List.
The criteria for the 1st field is "Is Not Null" & the latter 3 fields are checkboxes.
The Query produces a Datasheet which list all records fulfilling the "Is Nor Null" criteria and with the latter 3 fields displaying checkboxes.

From your helpful suggestion I have created an additional column headed Expr1 with criteria IIF([eNrwsletter],"Y","N"), but when I run this it produces successive dialogue boxes requesting definition of Expr1 & eNewsletter. If I re-enter those details the query runs but produces an empty datasheet.

What I am hoping to achieve is to convert the checkboxes into Y/N results.

Would you have any suggestions please.

cbhydro
 
It isnt a criteria, it is a seperate column
Try pasting this as a new column: ENewsYN: Iif([e-NEWS List], "Y", "N")

May have to replace , by ; depending on your regional settings though
 
Thank you Namliam,

I eventually gathered what you were telling me and it worked well.

Your efforts are much appreeciated.
jcbhydro
 

Users who are viewing this thread

Back
Top Bottom