check box results for export

eggwater

life as a rehearsal
Local time
Today, 21:22
Joined
Aug 14, 2003
Messages
69
i have searched for this but not really found anything similar:

I'm sure it's dead easy but I want my check boxes on my form to store codes instead of '1' or '0' for export purposes.

eg. a check box for Data Connection? (YES/NO) would store code 'A' if checked and ' ' (ie. null) if unchecked.

any suggestions?
 
Check boxes are true or false... (Yes/no) things. 2 ways to go that i can see...

Go thru the whole app changing everything connected to the check box

Or

Change the export ( prev option it seems to me) For this in your export you can use:

IIF(Checkbox,"A", Null) or
IIF(Checkbox,"A", "")
or something simular

Regards
 
thanks... I'll give the export Query a makeover

and see if that works...

"I might be back" as a confused Arnold Schwarzenneger might say
 
type mismatch

when I try to include the the expression in my export query:

DATA_CON: IIf([Accom_record_card]![Data_connect]="1","A",Null)

I get Type Mismatch in Expression error...

is there any way around this??

:confused:
 
DATA_CON: IIf([Accom_record_card]![Data_connect]=1,"A",Null)

Dataconnect appearently is a numberic value... try above statement

Regards
 
thanks again

the query now runs without error messages - yet I don't get a value of "A" in my new DATA_CON field?!

YES does = 1 doesn't it?
 
it's okay

solved it by substituting 1 for YES in the xpression

thanks for your help

:)
 
if i am right:
-1 = yes/true
0 = no/false

Anyway in checkbox fields you dont even need to compare you can do just what i posted above:
IIF(Checkbox,"A", Null) or
IIF(Checkbox,Null,"A") or
IIF(NOT Checkbox,"A", Null)

Since the checkbox allready has true/yes or false/no in it...

Regards
 

Users who are viewing this thread

Back
Top Bottom