A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Inputformat of fields



 
 
Thread Tools Display Modes
  #1  
Old September 28th, 2005, 02:46 PM
Dietmar
external usenet poster
 
Posts: n/a
Default Inputformat of fields

Hi group,

i have got a stupid problem: In my database there are fields storing
time-information in seconds. The form should display the time as hours
(simple calculate by 3600).

This is not a problem at all;-)

But the problems start because the user should be able to modify the
field (also entering hours) - the value should be stored in seconds
again!

I worked one afternoon on this issue and could not find a solution.
Please - could anyone help me and preseve me from damaging my monitor?

Thanks,
Dietmar

  #2  
Old September 28th, 2005, 04:31 PM
Klatuu
external usenet poster
 
Posts: n/a
Default

Here is some basic info that might help. How you use it and where you put it
will depend on the design of the form:
dtmTotTime = TimeSerial(0,0,lngSeconds)
Now lngTotTime will appear as a time, for example, if lngSeconds was 3600,
then dtmTotTime would show as 1:00:00 AM. Never fear, we can convert it to
hours:
lngHours = DatePart("h",dtmTotTime)
lngHours is now 1, so if you want it back to seconds:
lngSeconds = DatePart("h",dtmTotTime) * 3600

"Dietmar" wrote:

Hi group,

i have got a stupid problem: In my database there are fields storing
time-information in seconds. The form should display the time as hours
(simple calculate by 3600).

This is not a problem at all;-)

But the problems start because the user should be able to modify the
field (also entering hours) - the value should be stored in seconds
again!

I worked one afternoon on this issue and could not find a solution.
Please - could anyone help me and preseve me from damaging my monitor?

Thanks,
Dietmar


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
improving performance by indexing query criteria fields Paul James General Discussion 20 February 16th, 2005 07:55 PM
improving performance by indexing query criteria fields Paul James Running & Setting Up Queries 20 February 16th, 2005 07:55 PM
adding 2 fields including null entries Jesse Running & Setting Up Queries 26 January 18th, 2005 05:31 PM
Can't Add Fields to Form Jeff Miller Using Forms 4 January 12th, 2005 03:42 AM
Automatic filling of fields in table two from table one Jim Kelly Database Design 1 September 27th, 2004 10:16 PM


All times are GMT +1. The time now is 06:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.