Well I have gotten beyond the tough part of my project only to run into a quirk that I never expected.
I have a form where a user can input a zipcode and then a radius distance in miles. The subform then shows all of the zipcodes within the radius distance from the original zipcode. Once a user inputs a zipcode, a query is taking the latitude and longitude of that zipcode and calculating distances using a trigonometry formula. The subform is based on the results of this query. The problem that I'm having is that once I open the main form the subform doesn't yet have the zipcode data and is giving this error:
"The expression is typed incorrectly, or is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplfying the expression by assigning parts of the expression to variables"
Once I have the main form open and can input data, the subform will open and display the data if I open it as a separate form. It will not work while embedded in the main form. One solution that I can do but I really don't want is to have the zipcode and radius input on a separate form that the user could then push a "submit" button to get the subform data to open. I wanted to check to see if anyone else had any ideas before I go that route. I was wondering if there is a way to make a subform "inactive" or something like that to give the main form time to open and receive input.
Thanks for any input. (I'm keeping my fingers crossed that someone doesn't tell me to handle these calculations with code
. I don't think I have time to fool with that right now and I am soo close.)
I have a form where a user can input a zipcode and then a radius distance in miles. The subform then shows all of the zipcodes within the radius distance from the original zipcode. Once a user inputs a zipcode, a query is taking the latitude and longitude of that zipcode and calculating distances using a trigonometry formula. The subform is based on the results of this query. The problem that I'm having is that once I open the main form the subform doesn't yet have the zipcode data and is giving this error:
"The expression is typed incorrectly, or is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplfying the expression by assigning parts of the expression to variables"
Once I have the main form open and can input data, the subform will open and display the data if I open it as a separate form. It will not work while embedded in the main form. One solution that I can do but I really don't want is to have the zipcode and radius input on a separate form that the user could then push a "submit" button to get the subform data to open. I wanted to check to see if anyone else had any ideas before I go that route. I was wondering if there is a way to make a subform "inactive" or something like that to give the main form time to open and receive input.
Thanks for any input. (I'm keeping my fingers crossed that someone doesn't tell me to handle these calculations with code