asked on
lc.RowSource = "SELECT Count(*) AS total FROM sentitems where para Like '* " & Sobrenome.Value & "*' or para like '*" & EMail1 & "*' or para like '*" & Email2 & "*'"
Email_enviado = lc.Column(1)
ASKER
Dim rec As New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT Count(*) AS total FROM sentitems where para Like '* " & Sobrenome.Value & "*' or para like '*" & EMail1 & "*' or para like '*" & Email2 & "*'"
Dim rst As New ADODB.Recordset
rst.Open strSQL, cnx
rst.MoveFirst
Email_enviado = CDbl(rst("total"))
rst.Close
Set rst = Nothing
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY