Hi,
Need to call this function with parameter with delegate.Any suggestions welcome
Cheers
Public Function RecordTable(ByVal Table As String, ByVal OutWhere As String) As Boolean '-------------------------------------------------------------------------------- 'Pre Conditions: 'Table doing search on must contain the field refno 'Parameters: 'Table: Name of table to use in search 'Outwhere: WHERE section of the sql statement 'Post Condition: 'If record found in table then return true 'else return false 'On error 'Msg displayed and function exits '-------------------------------------------------------------------------------- Dim SQL As String Dim RS As New Recordset Dim flgRecord As Boolean = False If OutWhere.Trim = String.Empty Then Exit Function End IfSQL = "SELECT REFNO FROM " & UCase(Table) & " WHERE ClientCode = " & GetSQLValue(ClientCode, 4) & " And " & OutWhere RS = OpenRs(SQL) If RS.EOF = False Then flgRecord = True RS.Close() Return flgRecord ErrorHandler: AddMessage(FormatMessage(18, "RecordInTable " & OutWhere, Err.Description)) End Function '