Solved

Set value of a field with a button

Posted on 2014-09-03
3
174 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 85

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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