Solved

Set value of a field with a button

Posted on 2014-09-03
3
165 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
ID: 40301650
You can set the value of a field like this:

Me.YourFieldNow = Now
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40301688
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
ID: 40301698
Thank you!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

785 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