grid usage with DAO

varunit
09-07-2009, 06:53 PM
Hello guys... i am a beginner in vb and i have started preparing "Telephone Directory" as my mini project for college..

i have started well with splash screen,login module along with password recovery and new user registration. I have used DAO with MS access 97 database

No i want to display users the search results in a grid. i used data grid.

the code i used is..

dim db as database
dim rs as recordset
set rs=db.openrecordset("select * from lista")
with rs
if .recordcount > 0 then
"What should i write over here???"
end if
end with

Also please tell me first of all whether can i use grids with DAO or not. Because i feel others ADO as difficult.

My second problem is,,,

i use table called admin from the mdb file for login module. it works well

but later entering into the main module,

i tried to perform the following operations but it failed

dim db as database
dim rs as recordset
set rs=db.openrecordset("select * from admin where username='"varun"'")
with rs
if .recordcount > 0 then
msgbox"yes"
else
msgbox "no"
end if
end with

Actually i have an entry in the user name field of admin table for "varun"

But it always displays no...


Please try to help me with this issue because i have stuck with my project in the middle

i have uploaded my project...

please download and try to help me

here is the mediafire link

http://www.mediafire.com/download.php?kwwnzydjjvz


U can use my
userid : varun
password:reset123
to login as administrator and work in the telephone directory system..

Guys please help its highly urgent....

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum