 | | Tip of The Day - Microsoft Access Setup Script |
Use the following Visual Basic Script to work around the short field sizes imposed by Microsoft Access:
Function SetAllowZeroLength() Dim I As Integer, J As Integer Dim db As DAO.Database, td As TableDef, fld As DAO.Field
Set db = CurrentDb() 'The following line prevents the code from stopping if you do not 'have permissions to modify particular tables, such as system 'tables. On Error Resume Next For I = 0 To db.TableDefs.Count - 1 Set td = db(I) For J = 0 To td.Fields.Count - 1 Set fld = td(J) If (fld.Type = DB_TEXT Or fld.Type = DB_MEMO) Then if(fld.Name = "CONTENT") Then fld.Type = DB_MEMO End If fld.AllowZeroLength = true End If Next J Next I db.Close End Function
|
|  |