Solved

Set value of a field with a button

Posted on 2014-09-03
3
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 37

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

738 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