(Msg. 1) Posted: Fri Oct 12, 2007 10:28 am
Post subject: I have a -1 and a 0 for values Archived from groups: microsoft>public>access>tablesdbdesign (more info?)
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
(Msg. 2) Posted: Fri Oct 12, 2007 10:53 am
Post subject: RE: I have a -1 and a 0 for values [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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
(Msg. 3) Posted: Fri Oct 12, 2007 11:43 am
Post subject: Re: I have a -1 and a 0 for values [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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
(Msg. 4) Posted: Fri Oct 12, 2007 2:05 pm
Post subject: Re: I have a -1 and a 0 for values [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Fri, 12 Oct 2007 10:28:01 -0700, T Miller
<TMiller.TakeThisOut@discussions.microsoft.com> 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.
(Msg. 5) Posted: Thu Oct 08, 2009 8:27 am
Post subject: RE: I have a -1 and a 0 for values [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
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
(Msg. 6) Posted: Fri Oct 09, 2009 1:28 pm
Post subject: Re: I have a -1 and a 0 for values [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
There are several things you can do.
First of all, you can create your field as an integer or byte field, storing
1 or 0. On your data entry forms, you could represent this with a combo box
that displays Yes and No, but actually stores 1s and 0s. You could also
display it with an option group with two radio buttons, again displaying Yes
and No, but storing 1s and 0s.
Another option is to create the field as a boolean (Yes/No) field, which
will store the Yes's as -1. Then, anytime you do any math (like summing)
you can use the ABS() function to return the Absolute Value (which will be
positive).
As for the weighting, I would store the weight in a separate field, which
you can multiply with your "yes" values, to produce your weighted values.
"mdg381" <mdg381.RemoveThis@discussions.microsoft.com> wrote in message
news:822CF64A-B209-4036-9FCF-AC2FFAD1CE63@microsoft.com...
>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
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum