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_tru e_magnetic([frm_sample_even t].[current_mag_dec _direction],[Me].[azimuth_magneti c],[frm_sample_even t].[current_mag_dec lination])"
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_magnet ic) I'm trying to update on form. And it's not
working. The "frm_sample_eve nt" is where the mag dec and direction
are entered.
I also tried putting the function in the code for the form and
entering:
azimuth_correct ed = f_compute_true_ magnetic([frm_sample_even t].[current_mag_dec _direction],
[Me].[azimuth_magneti c], [frm_sample_even t].[current_mag_dec lination])
in the Form Load event but I get an error when I try to open that form
from the frm_sample_even t.
Thanks for any help you can offer.
Doug in Alaska
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_tru e_magnetic([frm_sample_even t].[current_mag_dec _direction],[Me].[azimuth_magneti c],[frm_sample_even t].[current_mag_dec lination])"
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_magnet ic) I'm trying to update on form. And it's not
working. The "frm_sample_eve nt" is where the mag dec and direction
are entered.
I also tried putting the function in the code for the form and
entering:
azimuth_correct ed = f_compute_true_ magnetic([frm_sample_even t].[current_mag_dec _direction],
[Me].[azimuth_magneti c], [frm_sample_even t].[current_mag_dec lination])
in the Form Load event but I get an error when I try to open that form
from the frm_sample_even t.
Thanks for any help you can offer.
Doug in Alaska
Comment