Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

.I currently have an Access database (front end & back end). On the front end, I

ID: 3560712 • Letter: #

Question

.I currently have an Access database (front end & back end). On the front end, I have a user login form (frmlogin). To login, the user puts in their user ID, then clicks 'Login' (different logins have different layers of security attached to them).

On the back end, I have a table, with a few different categories: tbleTrack, with fields: UserNum, Activity, Time., where UserNum is their user ID, Activity is what they did (for this, it should say "Login"), and Time is obviously the time.

What I'm trying to do, is make it so that when a user clicks the "Login" button on frmlogin, it creates a record on tbleTrack, with their information. I want to do this with SQL, but am running into problems getting it to work. Any help on this would be greatly appreciated.

I feel I need to use the INSERT INTO, and SELECT functions, but for some reason I can't get it down.

Any help or examples would be greatly appreciated!

Explanation / Answer

/..Create an Append query. It will have a parameter for UserNum (let's assume you call it parUserNum). Then run that append query when user successfully logs in:.bvs3

dim qd as dao.querydef

set qd=currentdb,querydefs("myAppendQuery")

qd!parUserNum = Me.UserNum

qd.Execute dbFailOnError

set qd=nothing