A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Data returned on check boxes



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2004, 11:55 PM
Pat Dools
external usenet poster
 
Posts: n/a
Default Data returned on check boxes

We have check box controls on a form. When it is exported to SAS, a check
mark is read as a '0', and no check mark is read as a '-1'. Is there a way
to alter this to have a value of '1' for a check mark, and '0' for no check?
We are designing forms for a study whose accompanying codebook listed '0' and
'1' for unchecked/checked and we would like to be able to keep these values
and not have '0' and '-1' unchecked/checked. These fields should remain
single check boxes (as opposed to option groups).

Thanks,
--
Pat Dools
  #2  
Old December 4th, 2004, 12:30 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

You can change the value during the export by using a calculated field in a
query instead of the normal field. You would use a field similar to this:

MyOutputField: -[OriginalNameOfField]

But, if you're doing an export directly from a form's recordset (not using a
query via TransferText or some other export process), then the answer likely
is "no".

--

Ken Snell
MS ACCESS MVP

"Pat Dools" wrote in message
...
We have check box controls on a form. When it is exported to SAS, a check
mark is read as a '0', and no check mark is read as a '-1'. Is there a

way
to alter this to have a value of '1' for a check mark, and '0' for no

check?
We are designing forms for a study whose accompanying codebook listed '0'

and
'1' for unchecked/checked and we would like to be able to keep these

values
and not have '0' and '-1' unchecked/checked. These fields should remain
single check boxes (as opposed to option groups).

Thanks,
--
Pat Dools



  #3  
Old December 4th, 2004, 12:40 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

The CheckBox Control on the Form deosn't matter.

What matters is that Access/JET Boolean Field has 2 possible value: 0
representing False/No and -1 representing True/Yes. When a Boolean Field is
exported to another format, 0 and -1 will be exported.

If you need to export True/False as something different from -1/0, you will
need to
use a Calculated Field in a Query and export the data from the Query.
--
HTH
Van T. Dinh
MVP (Access)




"Pat Dools" wrote in message
...
We have check box controls on a form. When it is exported to SAS, a check
mark is read as a '0', and no check mark is read as a '-1'. Is there a

way
to alter this to have a value of '1' for a check mark, and '0' for no

check?
We are designing forms for a study whose accompanying codebook listed '0'

and
'1' for unchecked/checked and we would like to be able to keep these

values
and not have '0' and '-1' unchecked/checked. These fields should remain
single check boxes (as opposed to option groups).

Thanks,
--
Pat Dools



  #4  
Old December 4th, 2004, 01:05 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 3 Dec 2004 15:55:06 -0800, Pat Dools
wrote:

We have check box controls on a form. When it is exported to SAS, a check
mark is read as a '0', and no check mark is read as a '-1'. Is there a way
to alter this to have a value of '1' for a check mark, and '0' for no check?
We are designing forms for a study whose accompanying codebook listed '0' and
'1' for unchecked/checked and we would like to be able to keep these values
and not have '0' and '-1' unchecked/checked. These fields should remain
single check boxes (as opposed to option groups).


True/Yes/Checked is stored as -1, False/No/Unchecked is stored as 0 -
I think you may have your assignments backward!

I'd suggest exporting from a Query with a calculated field:

ExpField: Abs([field])

The Abs() function will convert the -1 True value to +1, and leave the
0 alone.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rapid input Via datasheet RudyR_Seattle General Discussion 4 January 31st, 2005 01:33 AM
how to use check boxes on a spread sheet NAVY GIRL NEEDS YOU! Database Design 2 November 9th, 2004 07:49 PM
SQL view of messed up action queries Kendra Running & Setting Up Queries 2 August 31st, 2004 09:53 PM
Firstly I am sorry if I have mis-posted this.I want to arrange that a database makes a call over ISDN; collects the data returned, stores it and moves on to the next record.I appreciate that this is not strictly speaking the function of a databas Larry Linson New Users 0 July 5th, 2004 12:55 AM


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.