Access True or False reversing sign

psamu

Active Member
Joined
Jan 3, 2007
Messages
462
I have created access table withy True or False field. When I do the query on using this field, I see true becomes -1, how do I change to 1 instead of -1 without using formula? I have about 200 field with tru or false field, using the formula is tedious. Thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
That is how Access stores boolean values.
Why do you need to change it at all?
 
Upvote 0
Thanks for responding.
I have two tables in access, Master table and Score table. The purpose of score table is holding the value for each master table fields. That means each item checked means, the value has to come from score table.
Since my first experiment of this type is I don’t know exactly how I manage this.
Master table itemNo.1 if checked then; get the value from Score Table itemNo.1. Here I am facing two problems one is Master table itemNo.1 checked means access shows as -1 and second how do I get the value from Score Table. I thinking that I have to create a query with formula using both tables. But I have two hundred items it is very tedious. Appreciate your help on this.
 
Upvote 0
I think we would need to see the data structure of each table and maybe some sample data.
 
Upvote 0
Below are two table. Master table need to get the value from Score table. Score value varies. If Master table -1 then get Score table value .

Code:
Master Table			Score Table	
Field NameData Type	Field Name Data Type
RE7	Yes/No		RE7	Number
RE8	Yes/No		RE8	Number
RE9	Yes/No		RE9	Number
RE10	Yes/No		RE10	Number
RE11	Yes/No		RE11	Number
RE12	Yes/No		RE12	Number
RE13	Yes/No		RE13	Number
RE14	Yes/No		RE14	Number
RE15	Yes/No		RE15	Number
RE16	Yes/No		RE16	Number
RE17	Yes/No		RE17	Number
RE18	Yes/No		RE18	Number
RE19	Yes/No		RE19	Number
RE20	Yes/No		RE20	Number
RE21	Yes/No		RE21	Number
RE22	Yes/No		RE22	Number
RE23	Yes/No		RE23	Number
 
Upvote 0
You should just be able to link the two tables in a query based on your "RE" field, and then use an IIF statement to return the value from the other table if the Master table value is -1 (you didn't say what you want to return if it equals 0).

So something like:
Code:
MyValue: IIF([MasteTable].[YesNoFieldName]=-1,[ScoreTable].[NumberField],0)
 
Upvote 0
You should just be able to link the two tables in a query based on your "RE" field, and then use an IIF statement to return the value from the other table if the Master table value is -1 (you didn't say what you want to return if it equals 0).

So something like:
Code:
MyValue: IIF([MasteTable].[YesNoFieldName]=-1,[ScoreTable].[NumberField],0)

Thanks. Appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,517
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top