Previous Topic

Next Topic

Inhoudsopgave

Book Index

Fields Property

Property Property Fields( Field : Variant ): IsahField_Object (R/W)

Description

Returns a field object based on a field name or field number.

Note: This is the default property.

Example

Sub Main()

Dim SQL

Dim Query

Dim Answer

Dim IsahFields

SQL = "Select LangCode, Description From Language"

Dim Query = Application.DataBase.CreateQuery( SQL )

Query.Open

Set IsahField = Query.Fields.Fields("Language")

Answer = "NL"

If Query.LookUp("Find a language","Language") then

' Use the fact that IsahFields_Object.Fields

' and IsahField_Object.Fields are default properties

Answer = Query("Language").Value

' Once again but without using the default properties

Answer = Query.Fields.Fields("Language").Value

' Once again but this time different

Answer = IsahField.Value

End if

Query.Close

End Sub