UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Command Button To Add Time    
 
   
MelMiddleton
post Oct 30 2011, 07:37 PM
Post #1

UtterAccess Enthusiast
Posts: 54



I have a command button I created with On click focus expression reads:
Private Sub Command27_Click()
Me!TimeIn = Now()
End Sub

But when I click it, nothing happens? What am I doing wrong?
Go to the top of the page
 
+
Aquadevel
post Oct 30 2011, 07:40 PM
Post #2

UtterAccess VIP
Posts: 6,898
From: Earth...




What is the control on the form to hold the time?
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 07:49 PM
Post #3

UtterAccess Enthusiast
Posts: 54



I have a text box linked to my time card table. Text box is named LbTimeIN

Tinkering with the code it now says

Private Sub CmdTimeIN_Click()
Me.TimeIn = Now()
End Sub
Go to the top of the page
 
+
arul
post Oct 30 2011, 08:23 PM
Post #4

UtterAccess Enthusiast
Posts: 51



It works fine for me...


Private Sub Command0_Click()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub


Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub

This post has been edited by arul: Oct 30 2011, 08:25 PM
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:14 PM
Post #5

UtterAccess Enthusiast
Posts: 54



Im confused by the second set of codes?

Private Sub Command0_Click()
Me.TimeIn = Now()

Form_test.TimerInterval = 1000
End Sub


Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub


I have tried this every way I can think i have no idea why it wont work. . . any help anyone can offer please?
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:18 PM
Post #6

UtterAccess Enthusiast
Posts: 54



QUOTE (arul @ Oct 30 2011, 08:23 PM) *
It works fine for me...


Private Sub Command0_Click()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub


Private Sub Form_Timer()
Me.TimeIn = Now()
Form_test.TimerInterval = 1000
End Sub

------------------------------------------------------

like this?

Private Sub CmdTimeIn_Click()
Me.TimeIn = Now()
FRMInpute = 1000
End Sub


Private Sub FRMInput()
Me.TimeIn = Now()
FRMInpute.TimerInterval = 1000
End Sub
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:23 PM
Post #7

UtterAccess Enthusiast
Posts: 54



or this

Private Sub CmdTimeIn_Click()
Me!TimeIn = Now()
FRMInpute.TimeIn = 1000
End Sub
Go to the top of the page
 
+
arul
post Oct 30 2011, 09:24 PM
Post #8

UtterAccess Enthusiast
Posts: 51



Yes.... is it not working ?? I hope I got it right (your issue). Please find the sample database attached.


Attached File(s)
Attached File  wind.zip ( 393.16K ) Number of downloads: 1
 
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:36 PM
Post #9

UtterAccess Enthusiast
Posts: 54



Still not working. . . see my attached
Attached File(s)
Attached File  Test.zip ( 132.19K ) Number of downloads: 3
 
Go to the top of the page
 
+
arul
post Oct 30 2011, 09:39 PM
Post #10

UtterAccess Enthusiast
Posts: 51



sorry mate... i have Office 2003 installed on my computer
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:40 PM
Post #11

UtterAccess Enthusiast
Posts: 54



I see that I had the code wrong I have it as

Private Sub CmdTimeIn_Click()
Me.TimeIn = Now()
FRMInput.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.TimeIn = Now()
FRMInput.TimerInterval = 1000
End Sub

still a no go
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:43 PM
Post #12

UtterAccess Enthusiast
Posts: 54



ok progress, no if I click the button then the text box I get the time?
Go to the top of the page
 
+
MelMiddleton
post Oct 30 2011, 09:45 PM
Post #13

UtterAccess Enthusiast
Posts: 54



I got it! Phew! thank you sooooooo much
Go to the top of the page
 
+
arul
post Oct 30 2011, 09:48 PM
Post #14

UtterAccess Enthusiast
Posts: 51



yes.... on button click the text box shows the current time; keep refreshing every one second to give the updated time.
Go to the top of the page
 
+
arul
post Oct 30 2011, 09:52 PM
Post #15

UtterAccess Enthusiast
Posts: 51



(IMG:style_emoticons/default/yw.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 05:54 AM