Make table query boolean format

Erick

Active Member
Joined
Feb 26, 2003
Messages
362
I have a 'Make Table Query' where one of the fields I am trying to populate with Boolean (False) record, so I have:

Updatable:CBool(0)

However, when it makes the table, the format reverts back to integer. How can I make a table field with boolean type?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Is it Integer, or is it just displaying numbers? In the Lookup tab of the field's Properties, you can pick Yes/No, True/False, -1/0 and you can also display as Textbox, Combo or Checkbox.

Denis
 
Upvote 0
Have you tried using False?

I have tried that and still comes in the table as number.

Is it Integer, or is it just displaying numbers? In the Lookup tab of the field's Properties, you can pick Yes/No, True/False, -1/0 and you can also display as Textbox, Combo or Checkbox.

Denis

In the table created by the query, in design mode, when I look up the data type of the field, it is 'Number' rather than 'Yes/No'. I need the data to be boolean type because i need to import it into a 3rd party software program and it throws out an incompatibility error. The error goes away when I manually alter the data type to 'Yes/No' but I need for this to happen automatically through the make-table query.
 
Upvote 0
1) What does the third party software actually require as input? Access interprets True as -1 and some systems use 1 - so this could be the problem, rather than Number/Boolean as such.

2) You can append to an existing table with the data types already there rather than make a table (this is actually a two step process - first, clear the table with a delete query, second, append the records).

3) You probably could also use a query to query the table you made - the query can format or convert data types as needed for output.
 
Upvote 0
1) What does the third party software actually require as input? Access interprets True as -1 and some systems use 1 - so this could be the problem, rather than Number/Boolean as such.

2) You can append to an existing table with the data types already there rather than make a table (this is actually a two step process - first, clear the table with a delete query, second, append the records).

3) You probably could also use a query to query the table you made - the query can format or convert data types as needed for output.

Thanks Xenou for your reply.

I think the 3rd party software is looking for the data type to be 'Boolean'. It's weird because if I copy and paste the table into excel and import it, it works without any modification. But in access, unless I change the data type of the field to 'Yes/No' it says that the data type is incompatible. This is the reason why I think it is the data type that is the problem and not the actual value (-1, 1 or 'True').

I have 2 fields in the table that I am creating through 'Make-table' query that are suppose to be boolean type. 1 field is pre-set to false (all field record = false) and the other one to true.

Since I am running the make-table query through VB, just to get around this problem, I'm thinking of a 2-step process as well. First step is to create the table via SELECT....INTO and then step 2 change the data type via ALTER TABLE query.

I was just hoping I could do this somewhat cleaner by executing 1 SQL code.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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