# Get decimal part of a number, but store as integer ACCESS 2003 Database

I have a request for a change in recording time from just minutes to minuts and seconds.  The data will be stored in the main table as, say 1.30 minutes, that is one minute and thirty seconds.  On the form, there are two fields, one for minutes and one for seconds.  However, if there is a value in the field already, on the form I want the minute to appear, obviously, in the minute box and the seconds in the seconds box.  I amusing INT to get the interger, but I need to figure out how to get the decimals from the permanent table into the temp table as integer to be stored until they are returned to the permanent table.  that is, 1.30 needs to be in two boxes and if the user updates teh seconds to say 45, then what will be returned to the permanent table is the value 1.45 (on the seconds table, the max value accepted is 59 so keeps the user from inputting what would be considered a minute number)
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
convert the number to a string
split the string at the decimal point

if this is a macro

sTempString= Format(str(1.3), "#0.00")
sseconds =  Right(sTempString, Len(sTempString) - InStr(sTempString, "."))

0

Commented:
yourfield mod 1 * 100
1.30 mod 1 = .30 * 100 = 30
0

Experts Exchange Solution brought to you by ConnectWise

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

RetiredAuthor Commented:
Thank you both.  However, I was trying to remember the mod function as I knew there was something that did this.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.