Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Calculation Variable in another Field

Status
Not open for further replies.

weathergirl

Technical User
Jul 30, 2002
29
US
I'm calculating the difference between two times in a field on a form. I need this value to be entered in the table for further calculations in reports. I created another field to manually enter the minutes or the difference between the two times. Is there any script that would make the calculated value automatically go into that field?

Thanks,
Weather Girl
 
The Windows Time is set to the format 1:20:00 PM. I don't know how it would have changed if it did.

WG
 
Hmmm... Something has to be different. Send me the script you copied it into and I'll double check it on my machine.

Mac
Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
What script do you want? Any script associated with the form should be in that file.

WG
 
No, I meant for you to copy the code into a blank Script (not a method in a form). In your project desktop, right-click the Script Icon and pick new. Paradox will create an SSL file and open it for you. It looks a lot like a new method. Paste the code I typed above into it and then run the script (F8).

Mac
Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
I copied it into a new script and ran it. I tried a couple times and it worked.

WG
 
Okay, so now all you have to do is look for differences in your coding and mine and that should resolve the problem.



Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
There aren't any differences between the your and mine. Does it have to do with were I put the script in the form?

WG
 
No, but it will depend on how you assigned the variables. I did it straightforward in the script. If you did it a different way, that would explain it. Paste *your* code and tell me where you put it, and we'll see if we can figure it out.

Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
I would have put it in the Lead Time field under arrive. I may have taken it out because it didn't work, but that's where I had it. I just copied and pasted it in.

WG
 
Okay - I'm working on your query form now. I'll email it to you in a bit. Since I don't have the data entry form, you'll need to send it too so I can look at the minute calc problem. Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top