Link to home
Start Free TrialLog in
Avatar of Sandra Smith
Sandra SmithFlag for United States of America

asked on

Assign default value when creating table in ACCESS 2003

Is there a way to create a default value for a column when creating a table in ACCESS 2003?  the only documentation I can find indicates to use the ALTER TABLE statement, but is there a way to simply assign it when first creating the table?  I want the Match column to default to NO.  Also, is there a way to tell the process this should also be a checkbox, which by default is no?
strCreateTable = "CREATE TABLE tblTEMPWeeklyApps (Campaign_ID Integer, SSN Text(12), " & _
    "Booked Integer, Approved Integer, AppDate Date, Age Integer, " & _
    "Reference Text(20), AddrType Integer, DNIS Text(10), AppEID Text(20), " & _
    "Match Bit DEFAULT 'No')"

Open in new window

SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sandra Smith

ASKER

I was afraid I was stuck with the ALTER TABLE so that is the route and simplest.
Capricorn, yours was a way to do it, but more complicated than what I needed.  But thank you.
what about
< Also, is there a way to tell the process this should also be a checkbox>
i don't think it is fair that you will select a suggestion that only fulfills part of your requirement when there is  a complete solution offered.
OH MY GOSH, I completely missed that.  You are so correct, I will contact Adminiistration here and get some points moved.  
Cap, I have sent a request for attention and am requesting 400 points to be moved to you.  I am so very sorry, it has been a long continuous day-night-day and I missed what you were telling me.  Your response was the complete answer and does work but in the time alloted to get this out the door I did use the ALTER statement.
Thank you both and Cap, I again apologize as your works and is complete.  To be fair,  I did give points to DatabaseMX as that was the route I took at the time.