I've google searched and searched here, but I'm not sure of the terminology to use, so I'm not having luck with search results.
I'm writing a front end to an access database. It's logging product change requests. The process flow is something like this - any user submits a request, and the status of the request is set to "request" an administrator then evaluates the requests and determines if more information is needed to proceed, if we are going to proceed without additional info, or if the request is denied. If more information is needed - he/she may check a box for laborCost as an example. When they 'submit' updates (saves changes back to database) my code then should email those tied to labor to inform them to supply a value for further review. It then sets the status to pending.
The way I am attempting this - is with a users table (tblusers) It has access yes/no boxes for EngCost, MatlCost, LaborCost, and ToolCost.
If the labor box is checked on the PCR form - I am then attempting to look at the users table via a dataset - look at the column for laborcost and return all of the "true" values - so that I can 'return' a string to populate an outlook "Send to:" email.
here's my code so far
Public Function sendto(field As String)
Dim foundrows() As Data.DataRow
'Dim e() As String
' Dim es As String
'Dim fltr As Boolean = True
foundrows = DsPcrMaintenance.Tables("tblUsers").Select(field & "<> 0")
For i As Integer = 0 To foundrows.Count - 1
e(i) = DsPcrMaintenance.Tables("tblusers").Rows(i)("email")
Inside your loop you shoud use the foundRows not on the rows of the original table
Redim e(foundRows.Length) For i As Integer = 0 To foundrows.Count - 1 If Not IsDBNull(foundRows(i)("email")) Then e(i) = foundRows(i)("email").ToString() End If Next