Working with a remainder

J

JMK

Hi All,

I was wondering if there is a function available via a query (rather than
VBA) which will allow me to calculate on a remainder. I am trying to set up a
query to take NAD83 GPS Coordinates back into its full Lat/Long and have
everything but this last bit working.

For example:

62 27.77 is the GPS Coordinate in its decimal form, and I need to multiply
..77 by 60 - this will enable me to get the 62* 27' 46".

This information is fed to the query by an input form with a command button
running an append query - appending the full coordinate into the same table
the decimal form came from.

The only reason I dont want to use VBA is because, well, Im not very good at
using yet - I can change colours on a report and thats about it, but if its
VBA that is needed, then I'll learn quick! :)

Thanks ahead of time!
 
J

John W. Vinson

Hi All,

I was wondering if there is a function available via a query (rather than
VBA) which will allow me to calculate on a remainder. I am trying to set up a
query to take NAD83 GPS Coordinates back into its full Lat/Long and have
everything but this last bit working.

For example:

62 27.77 is the GPS Coordinate in its decimal form, and I need to multiply
.77 by 60 - this will enable me to get the 62* 27' 46".

This information is fed to the query by an input form with a command button
running an append query - appending the full coordinate into the same table
the decimal form came from.

The only reason I dont want to use VBA is because, well, Im not very good at
using yet - I can change colours on a report and thats about it, but if its
VBA that is needed, then I'll learn quick! :)

Thanks ahead of time!

Yes. The MOD function returns the remainder after dividing its two arguments;
e.g.

127 \ 60 = 2 (integer division)
127 MOD 60 = 7 (the remainder after dividing 127 by 60)
 
J

JMK

Thanks! Exactly what I was looking for!

MGFoster said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use a math function Int():

27.77 - Int(27.77) = 0.77

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSgjh34echKqOuFEgEQJAjQCcCOKB2cb0npITfApljP3Kq/2OLMUAoLhn
jd+rIhVy3KYtakD8KmPixten
=rArO
-----END PGP SIGNATURE-----
 
J

JMK

Thanks John, very helpful as always!

John W. Vinson said:
Yes. The MOD function returns the remainder after dividing its two arguments;
e.g.

127 \ 60 = 2 (integer division)
127 MOD 60 = 7 (the remainder after dividing 127 by 60)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top