count null record in filed with DAO

S

sal21

with this connection how to count record null or with len=0 in filed
APPELLATIVI and store the eresult in a var
Query, please...

Set DB1 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI
\ANAGRAFICA_OK_10092007.mdb")
Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")
 
G

Guest

Hi

Something like...

Set DB1 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI
\ANAGRAFICA_OK_10092007.mdb")
Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")

with RSD1
if .bof and .eof then
msgbox "no records"
exit sub
end if

.movefirst
mycount=0

do
if Nz(.fields!APPELLATIVI,"") = "" then
mycount = mycount + 1
end if
.movenext
loop until eof
end with

hth

Andy Hull
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top