Lookup Validations

Lookup Validations

Lookups are functions that are designed to fill a pick list of valid entries that can be presented to users to select an appropriate value. Lookups fill a two dimensional array of strings. The first dimension is the value that will be entered into the selected Conquest field. The second dimension is an optional description that should assist users to make their selection.

The first row of the array is used to fill the title of the selection dialog.

The following example continues from the example above and returns a list of valid television stations.

 Public Function LookupStation(ByRef rResults() As String, ByVal vID As Long)

 

 ReDim rResults(0 To 2, 0 To 1)

 

 rResults(0, 0) = "Abbreviation"

 rResults(0, 1) = "Full Name"

 rResults(1, 0) = "ABC"

 rResults(1, 1) = "Australian Broadcasting Corporation"

 rResults(2, 0) = "SBS"

 rResults(2, 1) = "Special Broadcasting Service"

 

End Function

Lookups are called when the user selects the F3 key in a field that has had the Lookup assigned to it.