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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Calculate Time Out    
 
   
961414
post Sep 7 2018, 03:05 AM
Post#1



Posts: 11
Joined: 11-August 18



help me!!!

i need calculate time_out from time_in n ordertime,,


sorry, i'm from indonesia,,
Attached File(s)
Attached File  karaoke.zip ( 23.77K )Number of downloads: 4
 
Go to the top of the page
 
961414
post Sep 7 2018, 07:31 PM
Post#2



Posts: 11
Joined: 11-August 18



sorry i don't know that,,
can you correct from my database
Go to the top of the page
 
RJD
post Sep 7 2018, 09:26 PM
Post#3


UtterAccess VIP
Posts: 8,803
Joined: 25-October 10
From: Gulf South USA


Hi 961414: Welcome to UtterAccess.

(NOTE: George split this out to this new thread. Thanks George!)

As isladogs indicated, you should start a new thread (topic) rather than add on to an existing thread. To do so, click on Forums, then select the forum that represents your topic. For example, "Access Q and A" might be a place to start if you can't decide where your thread should go. But a more specific forum would be better. Then click on New Topic, enter the title and start your post.

But, looking at your db and your question, your form timer event procedure looks like it is in the wrong place. Perhaps that needs to be in the On Current event ...

Private Sub Form_Current()
If IsNull(time_in) Then
time_in = Now()
End If
End Sub

This checks to see if there is already a time in the control, and if so, does not put a new time there. I would guess that you do not want the time continuously overwritten. Otherwise it posts the current time to the control, which is captured in the underlying field.

In the table (and thus showing on the form), you need not store the time out, since you have both the time in and the order time (I am guessing that is the elapsed time in minutes). You can simply put an unbound text box on the form (as a Long Time) and put this in it ...

=IIf(IsNull([ordertime]),Null,DateAdd("n",[ordertime],[time_in]))

This checks if there is an ordertime. If so the time out is calculated, If not, a Null results. As soon as you enter an order time, the time out recalculates automatically.

But I still think that isladogs gave you the correct advice - start a new thread, correct any of my incorrect assumptions, and proceed from there.

Good luck with your project. And again, welcome to UA. If you have not already, I suggest you visit and read both the Guidelines and Help sections here as well.

HTH
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
961414
post Sep 8 2018, 08:04 AM
Post#4



Posts: 11
Joined: 11-August 18



i am back

actually an ordertime field to hold the time ordered, and I want to calculate the time in the field time_out sum of the ordertime + time_in. and then a message will appear if the time in the time_out field is the same as the current time "your time is up !!!


help me
Go to the top of the page
 
isladogs
post Sep 8 2018, 09:02 AM
Post#5



Posts: 474
Joined: 4-June 18



As previously requested stop hijacking this thread and start your own with your question

--------------------
nil illigetimi carborundem est
Go to the top of the page
 
RJD
post Sep 8 2018, 09:03 AM
Post#6


UtterAccess VIP
Posts: 8,803
Joined: 25-October 10
From: Gulf South USA


Hi again: Obviously I did not understand what you are trying to do. And, unfortunately, still do not understand well what you are trying to accomplish.

But, once again, as isladogs and I have suggested, you should start a new thread and present your requirements and problems there. This will allow more members to address your problem. And in the new thread, please explain the context in which your db is to be used.

Good luck with your project.

Regards,
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
Jeff B.
post Sep 8 2018, 12:26 PM
Post#7


UtterAccess VIP
Posts: 10,128
Joined: 30-April 10
From: Pacific NorthWet


Not everyone has the same definition of "time". Are the fields you are referring to being 'typed' as Access date/time datatypes?

--------------------
Regards

Jeff Boyce
Microsoft Access MVP (2002-2015)

Mention of hardware or software is, in no way, an endorsement thereof. The FTC of the USA made this disclaimer necessary/possible.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    23rd September 2018 - 09:25 PM