Hi Tim,
Oops, I should have clarified it more clearly. Sorry for that.
DEFAULT is only available through ADO or Jet OLE DB Provider and I think
only this two ways are available for changing the default value of mdb file.
First of all, You should run the codes in this way: create a new form in
the mdb file, add a command button and its On Click Event like this
(using Jet OLE DB Provider)
Private Sub Command0_Click()
CurrentProject().Connection.Execute "ALTER TABLE YourTable " _
& "ALTER COLUMN YourColumn SET DEFAULT 50"
End Sub
Secondly, you could use DAO methods to change the default value like the
codes below
(using ADO)
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set db = CurrentDb
Set tdf = db.TableDefs("YourTable")
Set fld = tdf.Fields("YourColumn")
fld.DefaultValue = "1"
More detailed information about this is described in the folloing document
Intermediate Microsoft Jet SQL for Access 2000
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/htm
l/acintsql.asp
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center