| | |
|
|
|
Description Filed |
| message from piotr on 6 May 2004 |
Hi,
Is there any way to change value of 'description' field (column) in ms
access tables using scirpts?
I know you can read it using OpenSchema method of ADO Connetcion object but
that's the only thing you can do.
Piotr B.
|
| Brendan Reynolds replied to piotr on 6 May 2004 |
Public Sub ChangeDescrip()
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property
On Error GoTo ErrorHandler
Set db = CurrentDb
Set tdf = db.TableDefs("tblTest")
Set fld = tdf.Fields("TestByte")
fld.Properties("Description") = "New Description"
ExitProcedure:
Exit Sub
ErrorHandler:
If Err.Number = 3270 Then
'Property not found
Set prp = fld.CreateProperty("Description", dbText, "New
Description")
fld.Properties.Append prp
Else
MsgBox "Error " & Err.Number & ": " & Err.Description
End If
Resume ExitProcedure
End Sub
|
| piotr replied to Brendan Reynolds on 7 May 2004 |
Yes, this works fine. Thanks a lot.
Piotr B.
Użytkownik "Brendan Reynolds" <brenreyn at indigo dot ie> napisał w
wiadomości news:OE2Qk$1MEHA.3012@tk2msftngp13.phx.gbl...
|
|
Archived message: Description Filed (Microsoft Access)