ник: час
Hi ,
How I can get the captions of fields in the ms access table in VB6?Like
field("Field1").caption in ADO
Thanks
Show The Field Caption Of Msaccess Table
Edit: Re: http://www.xtremevbtalk.com/showthread.php?t=260267
I'm having the same problem:
Code:
Set rs = DBEngine(0)(0).OpenRecordset("SELECT TOP 1 " & Join(SubcomponentHeaders, ",") & " FROM Subcomponents")
On Error Resume Next
strTemp = ""
For i = 0 To rs.Fields.Count - 1
strTemp = strTemp & rs.Fields(i).Properties("Caption").Value
If Err.Number <> 0 Then
strTemp = strTemp & rs.Fields(i).Name & ","
Else
strTemp = strTemp & ","
End If
Next
On Error GoTo 0
SubcomponentHeaders is an array of Field names. ALL of my fields have captions, but only the field names get listed. Here is what I get when I enumerate the property names and valued for the "Minor_ID" field (the caption for which is "Subcomponent Identifier"):
Value H12-170
Attributes 34
CollatingOrder 1033
Type 10
Name Minor_Name
OrdinalPosition 1
Size 255
SourceField Minor_Name
SourceTable Subcomponents
ValidateOnSet False
DataUpdatable True
ForeignName
DefaultValue
ValidationRule
ValidationText
Required False
AllowZeroLength False
FieldSize
OriginalValue
VisibleValue
GUID ????????
Edit by Moderator:
Please start your own thread to ask your own questions. Post relevant links to other threads where necessary.