Hi,
I'm trying to do something that should be fairly simple but seems to be eluding me. I have a table which I update with a simple form that merely chooses or allows me to dump in data and then save the record. It's a mileage form. With one exception, the mileage is always consistant between several locations, so I made a separate table that lists:
StartingPoint
EndingPoint
Mileage
I'm trying to get the original form to pick the correct mileage based on what I put in for starting and ending points on the form. I was able to make a separate query (triggered by 'on lose focus') that showed me it was finding the correct record but do not know how to get the resulting mileage back into the original form. I tried setting the default value as the MILEAGE field of the query but it seems to grabs the default before I've had a chance to select my start and end points. I tried doing a requery when I get to that field in the form, but it just runs the query and doesn't actually put the info in. I tried to do a SETVALUE but get an error about 'not supporting Automation'. I'm running out of creative ideas.
So, I need the MILEAGE from either the original table of possible results or from the special query I made to go into the CALCMILEAGE field I made in the form. Any help would be appreciated. Thanks.
Michael
I'm trying to do something that should be fairly simple but seems to be eluding me. I have a table which I update with a simple form that merely chooses or allows me to dump in data and then save the record. It's a mileage form. With one exception, the mileage is always consistant between several locations, so I made a separate table that lists:
StartingPoint
EndingPoint
Mileage
I'm trying to get the original form to pick the correct mileage based on what I put in for starting and ending points on the form. I was able to make a separate query (triggered by 'on lose focus') that showed me it was finding the correct record but do not know how to get the resulting mileage back into the original form. I tried setting the default value as the MILEAGE field of the query but it seems to grabs the default before I've had a chance to select my start and end points. I tried doing a requery when I get to that field in the form, but it just runs the query and doesn't actually put the info in. I tried to do a SETVALUE but get an error about 'not supporting Automation'. I'm running out of creative ideas.
So, I need the MILEAGE from either the original table of possible results or from the special query I made to go into the CALCMILEAGE field I made in the form. Any help would be appreciated. Thanks.
Michael