Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 01-22-2015, 07:29 AM   #1
ICTkirsten
Newly Registered User
 
Join Date: Jan 2015
Posts: 137
Thanks: 43
Thanked 0 Times in 0 Posts
ICTkirsten is on a distinguished road
Button field

Hello I'm having a small issue with my button.. I need it to input the current time into the field each time it is clicked. At the moment I have it working with the code Me.textfield time$ however the current time stays in all the fields and changes all the fields. I want to know how I can have it so that the current time stays into one field and so the next time I click the button the field updates to that current time as opposed to all fields updating.... Sorry I'm not very clear. So to try and summarise: how do I set the code on my button to change the time in the next fields and not ALL of the fields...

ICTkirsten is offline   Reply With Quote
Old 01-22-2015, 07:50 AM   #2
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,462
Thanks: 51
Thanked 949 Times in 918 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Button field

are you using a continuous form? It sounds like the control is unbound
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the top right of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 01-22-2015, 07:53 AM   #3
ICTkirsten
Newly Registered User
 
Join Date: Jan 2015
Posts: 137
Thanks: 43
Thanked 0 Times in 0 Posts
ICTkirsten is on a distinguished road
Re: Button field

Yes, I am using a multi item form

ICTkirsten is offline   Reply With Quote
Old 01-22-2015, 08:02 AM   #4
mattkorguk
Newly Registered User
 
mattkorguk's Avatar
 
Join Date: Jun 2007
Location: Surrey, England
Posts: 299
Thanks: 7
Thanked 6 Times in 5 Posts
mattkorguk is on a distinguished road
Re: Button field

I'd add the button to the end of the row, within the continuous form, then you can reference the id for that row when you click the button.
mattkorguk is offline   Reply With Quote
The Following User Says Thank You to mattkorguk For This Useful Post:
ICTkirsten (01-23-2015)
Old 01-22-2015, 09:49 AM   #5
ICTkirsten
Newly Registered User
 
Join Date: Jan 2015
Posts: 137
Thanks: 43
Thanked 0 Times in 0 Posts
ICTkirsten is on a distinguished road
Re: Button field

i think i have already done that but the error still occurs
Attached Images
File Type: png sig.png (7.8 KB, 94 views)
ICTkirsten is offline   Reply With Quote
Old 01-22-2015, 01:47 PM   #6
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,462
Thanks: 51
Thanked 949 Times in 918 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Button field

As I said, the control needs to be bound to a field - otherwise every row shows the same value.
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the top right of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 01-22-2015, 01:59 PM   #7
ICTkirsten
Newly Registered User
 
Join Date: Jan 2015
Posts: 137
Thanks: 43
Thanked 0 Times in 0 Posts
ICTkirsten is on a distinguished road
Re: Button field

im not sure i understand, but this is what i have and think is what you mean
Attached Images
File Type: png sig.png (3.8 KB, 99 views)


Last edited by ICTkirsten; 01-22-2015 at 02:16 PM.
ICTkirsten is offline   Reply With Quote
Old 01-22-2015, 10:44 PM   #8
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,427
Thanks: 2
Thanked 1,993 Times in 1,949 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Button field

As gemma-the-husky wrote, you need to set the controlsource for "Sign In" and "Sign out" to a field in a table.

__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Reply

Tags
button , code , time

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
field button awake2424 General 1 05-04-2013 02:00 PM
Copy Field button and Paste Field Button GraemeG Modules & VBA 1 03-22-2011 01:56 AM
Button to add ID Field coolcatkelso Forms 0 03-31-2010 06:37 AM
Submit Button:How can I assign a button to go to the next record and its first field? nitinrao Forms 17 02-09-2010 01:43 AM
Next Field using TAB button bikeboardsurf General 2 09-14-2005 08:07 PM




All times are GMT -8. The time now is 10:35 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World