First you will need to know which user clicked teh link... i suppose you have a mdw related to this database.
So create a field called UserName as txt
Create a invisible txtbox you will call PassThruDate, Bound PassThrough to update (i suggest changing Update to UpdateDate),
bound another invisible txtbox, PassThruLink to Hyperlink Field
and last bound invisible PAssThruUser to UserName
lets suppose your hyperlink is a label... right click the label, properties go to event, on click, Select the 3 dots.. select by code, it will bring you to VBA immediate window
you should see something like this:
Code:
Private sub label1_click()
PassthruDate.txt = Now
PassThruLink = "Enter the link clicked here"
PassThruUser = CurrentUser()
Refresh
End sub
This is one way to do it, going through SQL wouldve been more straight forward, but harder for you to understand I think, if u want to go through SQL heres what you should enter:
Code:
Private sub label1_click()
Dim strsql as string
strsql = "UPDATE [highlight]TableName[/highlight] " & _
"SET UpdateDate = " & Now & ", " & _
"UserName = " & currentUser() & ", " & _
"[HyperLink Field] = 'name of hyperlink entered'"
DoCmd.RunSql "strsql"
End sub
Note that TableName should be the name of your table, and UpdateDate is if you changed the name of your field Update to UpdateDate....
both of these method should work, the 2nd one being better.