Method
Converts a value in a field to a string.
Category
Conversion
Syntax
Function FieldToStr(ByVal hTable As Long, ByVal hRec As Long, ByVal
FieldNo As Long) As String
hTable
The handle to the table.
hRec
The handle to the record containing the field to be converted.
FieldNo
The number of the field containing the value to be converted.
Example
If (Not openDatabase) Then
End
End If
'Opens table
CF1.OpenTable hTable, 15
hRecord = CF1.AllocRec(hTable)
CF1.FindRec hTable, hRecord, ("-")
'FieldToStr
tmpVar = CF1.FieldToStr(hTable, hRecord, 18) 'return the field "No. of blank lines"
If VarType(tmpVar) = vbString Then
logWr "FieldToStr OK"
Else
logWr "FieldToStr failed. It returned the wrong datatype"
End If
Comments
FieldToStr converts the contents of FieldNo in hRec to a
zero-terminated ASCII string and returns this string. The field
represented by FieldNo may be of any type.