here is the SQL Code:
SELECT [Tower Info].[Location (City)], [Tower Info].State, [Tower
Info].[Tower ID], [Tower Info].AKA, [Tower Info].Height, [Tower Info].AMSL,
IIf(Left([Tower Info].[Latitude],3)>99,Left([Tower
Info].[latitude],3),Left([Tower Info].[latitude],2)) AS [Latitude Degrees],
IIf(Left([Tower Info].[Latitude],3)>99,Mid([Tower
Info].[Latitude],5,2),Mid([Tower Info].[Latitude],4,2)) AS [Latitude
Minutes], Right([Tower Info].[Latitude],2) AS [Latitude Seconds],
IIf(Left([Tower Info].[Longitude],3)>99,Left([Tower
Info].[Longitude],3),Left([Tower Info].[Longitude],2)) AS [Longitude
Degrees], IIf(Left([Tower Info].[Longitude],3)>99,Mid([Tower
Info].[longitude],5,2),Mid([Tower Info].[longitude],4,2)) AS [Longitude
Minutes], Right([Tower Info].[Longitude],2) AS [Longitude Seconds],
[Latitude Degrees]+([Latitude Minutes]/60)+([Latitude Seconds]/3600) AS [Lat
Dec], [Longitude Degrees]+([Longitude Minutes]/60)+([Longitude
Seconds]/3600) AS [Long Dec], [Input lat degrees]+([Input lat
minutes]/60)+([Input lat secounds]/3600) AS [Input Lat Dec], [Enter Longi
degrees]+([Enter long Minutes]/60)+([EnterLong secounds]/3600) AS [Input
Long Dec], Sqr((([Input Lat Dec]-[Lat Dec])^2)+(([Input Long Dec]-[Long
Dec])^2))*60 AS Distance
FROM [Tower Info]
WHERE (((Sqr((([Input Lat Dec]-[Lat Dec])^2)+(([Input Long Dec]-[Long
Dec])^2))*60)=[Enter Milage]));
I suspect the fields that gives you problems are these : ([Input Lat Dec]-[Lat
Dec])^2)+(([Input Long Dec]-[Long
Dec].
I think I have had the same problem as you have. To solve this you need to
create a new query based upon the orginal one, but don't include the where
clause.
In the new query select all the fields you want and add the where clause.
If this does'nt help, let me know, because I might have interpreted your problem
wrong.
Greeting from Norway
--Thomas Jensen--
--
John Viescas
author, "Running Microsoft Access 97"
http://www.amazon.com/exec/obidos/ISBN=1572313234/
Mr J wrote in message ...