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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I have a -1 and a 0 for values



 
 
Thread Tools Display Modes
  #1  
Old October 12th, 2007, 06:28 PM posted to microsoft.public.access.tablesdbdesign
T Miller
external usenet poster
 
Posts: 76
Default I have a -1 and a 0 for values

I want to change them from the -1 to equal YES and the 0 to equal NO. Does
this need to be done from the table? If so, where do you make this happen?
OR, Does it need to be done in the make table query? If so, how?
--
Thomas
  #2  
Old October 12th, 2007, 06:53 PM posted to microsoft.public.access.tablesdbdesign
Klatuu
external usenet poster
 
Posts: 7,074
Default I have a -1 and a 0 for values

Use a Calculated Field in your query to transform the values:

YN: iif([YesNoField] = 0, "No","Yes")

--
Dave Hargis, Microsoft Access MVP


"T Miller" wrote:

I want to change them from the -1 to equal YES and the 0 to equal NO. Does
this need to be done from the table? If so, where do you make this happen?
OR, Does it need to be done in the make table query? If so, how?
--
Thomas

  #3  
Old October 12th, 2007, 07:43 PM posted to microsoft.public.access.tablesdbdesign
fredg
external usenet poster
 
Posts: 4,386
Default I have a -1 and a 0 for values

On Fri, 12 Oct 2007 10:28:01 -0700, T Miller wrote:

I want to change them from the -1 to equal YES and the 0 to equal NO. Does
this need to be done from the table? If so, where do you make this happen?
OR, Does it need to be done in the make table query? If so, how?


No, your table should store -1 or 0.

Wherever you need to display the value as "Yes" or "No", set the
Format property of that control to:
;"Yes","No";
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old October 12th, 2007, 09:05 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default I have a -1 and a 0 for values

On Fri, 12 Oct 2007 10:28:01 -0700, T Miller
wrote:

I want to change them from the -1 to equal YES and the 0 to equal NO. Does
this need to be done from the table? If so, where do you make this happen?
OR, Does it need to be done in the make table query? If so, how?


It should not be done in EITHER place. Tables are for data storage, not for
data presentation!

Yes *is* stored as -1, and No as 0. True and False are also synonyms, but the
actual storage is as a number. You don't need to care about that, though; if
you're going to display the value, you can use a Form (for onscreen use) or
Report (for printing), and set the format of the textbox bound to this field
appropriately.

John W. Vinson [MVP]
  #5  
Old October 8th, 2009, 04:27 PM posted to microsoft.public.access.tablesdbdesign
mdg381
external usenet poster
 
Posts: 1
Default I have a -1 and a 0 for values

I have the same values, but I want a +1 for yes, and 0 for no. Since I want
these exported to Excel in the interim and eventually to figure out how to
make a chart in Access, I need the values reported as positive numbers for
calculations. Is that possible?

Also, for Yes, sometimes I want the value to be 6, or 7, or, 8 or whatever.
Yes having been assigned a weighted value for that particular input. Can I
do that? It need to be a positive value. How do I do that?
--
-Lost in Access


"T Miller" wrote:

I want to change them from the -1 to equal YES and the 0 to equal NO. Does
this need to be done from the table? If so, where do you make this happen?
OR, Does it need to be done in the make table query? If so, how?
--
Thomas

 




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


All times are GMT +1. The time now is 07:07 PM.


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