Solved

Set value of a field with a button

Posted on 2014-09-03
3
161 Views
Last Modified: 2014-09-03
I have a tabular subform with fields expr1, time in, time out, and initials.
I would like to add a button next to each record that, on double click, sets the value of time out to now().
0
Comment
Question by:TIgerV
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
You can set the value of a field like this:

Me.YourFieldNow = Now
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
You don't even need a button.  You can put the suggested code into the double click event of the control you want to update.  

However, if you do use a button, the correct event to use is the click event.  It is important that interface actions be consistent across the board.  If in every other application (including windows) and in all your other forms, clicking once activates the button code, then that is how buttons should work on this form.
0
 

Author Closing Comment

by:TIgerV
Comment Utility
Thank you!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now