Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datasheet Subform selection 1

Status
Not open for further replies.

Javamahn

Technical User
Mar 14, 2001
143
US
I am new to access and would like to know if it is possible to click a record displayed in a datasheet subform and in doing so update that record. The record has fields TrasactionID, ItemID, Customer, TimeOut, and Timein. When the user clicks on the little record selection box all the way to the left of the subform, can I execute a msgbox vbYesNo and then upon Yes update the TimeIn with now()?
I have a decent concept of what I want it to do just not how to do it.

Thank you in advance
 
Hi Javamahn,
Well no not really, because you're only event that might fire would be the "on current" event and that might be a disaster. You could however, add a command button just beside or just beside your timein field and in its "on click" event in Visual Basic add this:

If MsgBox("Are you sure you would like to set the time in to ''Now''?",vbyesno+vbquestion,"Time in confirmation...")=vbno then exit sub
Me.TimeIn = Now()

Just like that should do it! Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top