Hi,

In Vb i have a form for login and many forms.After i login the username is displayed in all the forms. I can add,update and save the records in database table. But i now want to store the Username to these records so that to check who has entered the particular record.

Can anybody tell me how to write the code for saving the Username.

Thanks

Recommended Answers

All 2 Replies

use a code (a number ) for each user and put it in every table. Or create the primary key of the table with some relation with the userid.

Krs13,
If you can add and update records in database then I think there should not be any problem with saving username with records. I feel it is if you add one line of code like

rs!Editedby = txtUsername.Text

in your add and update code. Here rs is recordset that you dim.
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.