Douglas,
you may have provided the clue to the problem, but I can't be sure.
The form/Query works like this: it relies on a couple of things.
A criteria on a control that exisits on the form; it is a postcode.
It also relies on a calculated field in the query, that takes two fields
from the base table and calculates the 'GreatDistanceArc' formula against
two
fields on the form, which gives me the distance between two geocodes. This
all works fine on the form, but of course when I run the query, the field
results are natrually blank as it doesn't know which postcode control to
reference, and what the equating geocode on the form is. So in summary,
the
query returns no results, and only updates when in the form.
Is this the same as your condtional premise of it being updatable?
Here is the SQL:
SELECT tbl_School_Points.KnowledgePointID, tbl_School_Points.Point,
tbl_School_Points.Road_Street, tbl_School_Points.Postcode,
[Forms]![frm_Runs]![Run_From_Lat] AS Lat1,
[Forms]![frm_Runs]![Run_From_Lon]
AS Lon1, tbl_School_Points.Lat2, tbl_School_Points.Lon2,
GreatArcDistance([Lat1],[Lon1],[Lat2],[Lon2],3963) AS Dist,
tbl_School_Points.Category
FROM tbl_School_Points
WHERE
(((tbl_School_Points.Postcode)=[Forms]![frm_Runs]![Run_From_Postcode]
Or (tbl_School_Points.Postcode)=[Forms]![frm_Runs]![Run_To_Postcode]));
Douglas J. Steele said:
If you run the query by itself, is it updatable? If it isn't, the form
won't
be either.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
I have a Subform based on a query, which is based on at table. The query
contains a calculated function, for some reason I cannot edit the
fields.
Can
someome tell me why this may be so?.
everything appears to be in order regarding the various properties
relating
to editing.
Data Entry - No
Allow Additions - Yes
Allow Deletetions - Yes
Allow Filters - Yes
Record Locks - No Locks
I'm baffled, and frustrated...