Setting a field to YES/NO data type

P

PaulG

I am trying to set a fields data type to "YES/NO" using
VBA. Below is my code:

DoCmd.RunSQL "ALTER TABLE [Temp Entity - Ownership Table -
All Relationships] ALTER COLUMN [RecordChanged] Yes/No"


I receive the following error message from this code:

"Syntax error in ALTER TABLE statement."

What is the correct syntax or statement?

Any help is appreciated.

Thanks,

Paul
 
W

Wayne Morgan

This appears to do it.

DoCmd.RunSQL "ALTER TABLE [Temp Entity - Ownership Table - All
Relationships] ALTER COLUMN [RecordChanged] YesNo"
 
D

Dirk Goldgar

PaulG said:
I am trying to set a fields data type to "YES/NO" using
VBA. Below is my code:

DoCmd.RunSQL "ALTER TABLE [Temp Entity - Ownership Table -
All Relationships] ALTER COLUMN [RecordChanged] Yes/No"


I receive the following error message from this code:

"Syntax error in ALTER TABLE statement."

What is the correct syntax or statement?

Any help is appreciated.

Thanks,

Paul

Try any of the following for the column's data type:

BIT
YESNO
LOGICAL
BOOLEAN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top