Click to See Complete Forum and Search --> : Help with ACCESS/VB


Bill Garrett
July 18th, 2001, 12:43 PM
Good day to everyone. I'm currently creating a database for a client using MS Access 2002. I'm doing a lot of the actual coding with VisualBasic, and ran into a bit of a problem. When the users log in to the database, they enter a username/password for their specific access-rights. I need to take this username and put it in the "LastPersonToUpdate" field in the database table so the last updater is recorded. I have NO idea how to go about this. Any ideas? Either using Access or VB Code?

Thanks,

Bill Garrett

Iouri
July 18th, 2001, 01:32 PM
Set the connection to the database from VB code and after that execute ans SQL

sSQl = "update MyTable set LastPersonToUpdate = '" & sUserName & "'"

cn.Execute sSQL


where cn is your connection string

Iouri Boutchkine
iouri@hotsheet.com