用sql设置access的默认值(2)
End With
Set MyDB = Nothing
Bye_GetFieldDescription:
Exit Function
Err_GetFieldDescription:
Beep
Debug.Print Err.Description
MsgBox Err.Description, vbExclamation
GetFieldDescription = Null
Resume Bye_GetFieldDescription
End Function
关于“多步错误”的一些参考:
Sub ChangeUnicode()
Dim tdf As TableDef
Dim fld As Field
Dim db As Database
Dim pro As Property
Set db = CurrentDb
For Each tdf In db.TableDefs
For Each fld In tdf.Fields
If fld.Type = dbText Then
If DBEngine.Errors(0).Number = 3270 Then
Set pro = fld.CreateProperty("UnicodeCompression", 1, 0)
fld.Properties.Append p
End If
fld.Properties("UnicodeCompression") = True
End If
Next fld
Next tdf
End Sub
内容版权声明:除非注明,否则皆为本站原创文章。