Setting a field to YES/NO data type

  • Thread starter Thread starter PaulG
  • Start date Start date
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
 
This appears to do it.

DoCmd.RunSQL "ALTER TABLE [Temp Entity - Ownership Table - All
Relationships] ALTER COLUMN [RecordChanged] YesNo"
 
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
 
Back
Top