I wrote a simple funtion to automatically compute corrected azimuths
in several places in a database but am having trouble implementing it.
I placed the function in a module and am trying to pass to it three
variables: magnetic declination, compass degrees and declination
direction (east or west). The idea is that a user will enter the
current magnetic declination and direction in a form and have those
parameters apply to other forms (where the unique ids match).
How do I pass the variables to the function in the module and have the
function result passed back to the correct text box on the form?
I tried calling the function simply by placing
"=f_compute_true_magnetic([frm_sample_event].[current_mag_dec_direction],[Me].[azimuth_magnetic],[frm_sample_event].[current_mag_declination])"
in the form load event line in the properties of my form. I also
placed this line in the After Update event for object
(azimuth_magnetic) I'm trying to update on form. And it's not
working. The "frm_sample_event" is where the mag dec and direction
are entered.
I also tried putting the function in the code for the form and
entering:
azimuth_corrected = f_compute_true_magnetic([frm_sample_event].[current_mag_dec_direction],
[Me].[azimuth_magnetic], [frm_sample_event].[current_mag_declination])
in the Form Load event but I get an error when I try to open that form
from the frm_sample_event.
Thanks for any help you can offer.
Doug in Alaska