This is the code I use the update the data. (I concatenate two strings). But at this point my variables are gone.
Private Sub cmdProcess_Click()
On Error GoTo ErrorHandler:
Dim sUserLoc As String
Dim sUserLocfullname As String
Dim sFolderLoc As String
Dim sFolderLocfullname As String
Dim sInsertLocFullname
cmdOK.Enabled = False
Dim strSQL As String
Dim rec As DBResults
Dim DB As EisDB
Dim lngRowIndex As Long
Dim strCell As String
intMsgIndex = 0
'Loop through the grid
For lngRowIndex = 1 To ssQueued.MaxRows
ssQueued.Row = lngRowIndex
If Not IsNull(ssQueued.CellValue(ssQueued.Col, ssQueued.Row)) Then
ssQueued.Col = 7
strCell = ssQueued.CellValue(ssQueued.Col, ssQueued.Row)
ssQueued.Col = 1
Select Case ssQueued.CellValue(ssQueued.Col, ssQueued.Row)
Case "F"
strconcatenated = strconcatenated & "UPDATE folder SET flocation = '" & sUserLoc & "'" & ", fcurrloc = " & " '" & "In: " & sUserLocfullname & "(" & sUserLoc & ")" & "'" & " where fbarcode = '" & strCell & "' "
Case "I"
strconcatenated = strconcatenated & "UPDATE incert set icurrloc = " & " '" & " In: " & sUserLocfullname & "(" & sUserLoc & ")" & " '" & " where ibarcode = '" & strCell & "' "
End Select
End If
Next lngRowIndex
Set DB = Nothing
sUserLoc = ""
sFolderLocfullname = ""
sFolderLoc = ""
cmdOK.Value = True
Exit Sub
ErrorHandler:
MsgBox "Error " & Err.Number & vbCr & _
"Location: " & "VBA.frmCheckIn.cmdOK" & vbCr & _
Err.Description, vbOKOnly + vbExclamation, _
"Records Check In