Hi

I wonder how to extract just rs("Email")

from this code

If rs.RecordCount = 0 Then

Exit Function
End If




rs.MoveLast
rs.MoveFirst
max = rs.RecordCount
rs.MoveFirst
LstData3.Clear
For i = 1 To max

LstData3.AddItem rs("Email")
rs.MoveNext

Next i

I have 10 different person in the databas but only
3 with email account
I will in an list3 that just thoose wich have email shall be visible
how to do that, and if the databas is filled with more email adess
it shall become vissible in the list3

Recommended Answers

All 2 Replies

i really dont understand the exact problem but if you wanna display names of the those candidate who are having emails then try this :-

rs.Open "select Name,email from email_table ", conn, 2, 3
While (rs.EOF = False)
If (rs!Email <> "") Then
LstData3.AddItem rs!Name
End If
rs.MoveNext
Wend

it will display all who are having email address.

hope this helps you . . .

So what the problem here?
Provides more information.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.