I have a SQL query that returns the names selected fields on the current form. I want to retrieve the text value found in the selected fields on the form.
Example Return Value:
fieldName = "addressDisplay"
fieldType = "text"
On the current form, the addressDisplay.text value is:
"123 Elm Street"
I want my outputValue variable to be "123 Elm Street" at the location denoted by *** below.
- - - - - - - - - -
queryString = "SELECT fieldName,fieldType " & _
"from labelFields where " & _
"labelName = '" + labelName + "'"
' Execute the Query
' outputTable is a DataTable
outputTable = sf.getSQLData(queryString)
If Not outputTable Is Nothing Then
' Grab the location values
currRows = outputTable.Select(Nothing, Nothing, DataViewRowState.CurrentRows)
If (currRows.Length < 1) Then
locationSelection.Items.Add("No Current Rows Found"
Else
' Loop through the bookmarks and replace the values
For Each dRow In currRows
fieldName = Trim(dRow.Item("fieldName".ToString)
fieldType = Trim(dRow.Item("fieldType".ToString)
Select Case fieldType
Case "text"
outputValue = *** fieldName.Text ***
Case "128B"
outputValue = *** code128(fieldName.Text) ***
End Select
Next 'For Each dRow In currRows
End If 'currRows.Length < 1
End If 'Not outputTable Is Nothing
- - - - - - - - - - -
I hope this explains the problem.