Hi,
I need to update all the default values of the fields in Access.
I don't know what fields have default value. So, I open all the tables and
look throught all the fields.
Would you guys point me to a better way to do this please?
Thanks!
> There is no answer.
> There has not been an answer.
> There will not be an answer.
> That IS the answer!
> And I am screwed.
> Deadline was due yesterday.
>
> There is no point to life.
> THAT IS THE POINT.
> And we are screwed.
> We will run out of oil soon.
Douglas J. Steele - 01 Jul 2005 00:46 GMT
While I realize this is an ADO-focussed newsgroup, in my opinion DAO is the
way to go for this:
Sub DefaultValues()
Dim dbCurr As DAO.Database
Dim tdfCurr As DAO.TableDef
Dim fldCurr As DAO.Field
Set dbCurr = CurrentDb()
For Each tdfCurr In dbCurr.TableDefs
For Each fldCurr In tdfCurr.Fields
If Len(fldCurr.DefaultValue) > 0 Then
Debug.Print tdfCurr.Name & "." & _
fldCurr.Name & " has default value " & _
fldCurr.DefaultValue
End If
Next fldCurr
Next tdfCurr
End Sub

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi,
>
[quoted text clipped - 15 lines]
>> And we are screwed.
>> We will run out of oil soon.