Hi,

I have create login (with help with some tutorial) I have tblUsers:

- UserID
- UserTypeID
- FName
- LName
- UserName
- Password
- etc

There is 3 type of User (Admin, User, Viewer)

So this login work well. If admin login then display form for admin, if user login then display form for user, etc.

I want to user to login and only show only his/her records. I have create a form1 with DGV1 that show all records for all users. But I also have a textbox on this form:

- If I type in textbox1 "1" then it show only records for UserID 1
- If I type "2" then it show only record for UserID 2

Also this work fine.

But now.....

I not want to type userID. When user login textbox1 must know what UserID is logged in now.

So I think when user press "login" button then textbox1 on form1 must automatically fill with that UserID..

Login form is only show UserName and Password.. So I can not take that data to form1.. I need to take UserID to form1.

Can someone please give me proposal on how to do?

Thanks
M