P
Pat
Hi All,
This is my first post here, and this is probably a very noobish
question, but I've been searching for hours and really need to solve
this problem.
I'm working on a project for work where given an origin and a
destination I need to return the distance between the two points. I've
been supplied with a table containing (believe it or not) every
possible combination of origins and destinations that I would ever
need, and their respective distances apart.
I've created a form with two combo boxes in it, one combo is populating
from the origin column of the table, and the other from the destination
column. This form also includes a command button that executes a query
that I have a query set to return the mileage value if provided the
origin and destination:
The query is set up like:
[Forms]![frmMileage]![combo_From]
[Forms]![frmMileage]![combo_To]
My issue is that the query (when run from the form) never returns ANY
information. It works fine however, if run directly as a query (and I
key in the information).
After some debugging I discovered that the problem is that the combo
boxes are passing the integer index values to the query and not the
STRING of the selected item.
Is there a way to capture these two string values (origin and
destination) and pass them to the query?
I reallllly appreciate anyone who is willing to help me out here.
--Pat
This is my first post here, and this is probably a very noobish
question, but I've been searching for hours and really need to solve
this problem.
I'm working on a project for work where given an origin and a
destination I need to return the distance between the two points. I've
been supplied with a table containing (believe it or not) every
possible combination of origins and destinations that I would ever
need, and their respective distances apart.
I've created a form with two combo boxes in it, one combo is populating
from the origin column of the table, and the other from the destination
column. This form also includes a command button that executes a query
that I have a query set to return the mileage value if provided the
origin and destination:
The query is set up like:
[Forms]![frmMileage]![combo_From]
[Forms]![frmMileage]![combo_To]
My issue is that the query (when run from the form) never returns ANY
information. It works fine however, if run directly as a query (and I
key in the information).
After some debugging I discovered that the problem is that the combo
boxes are passing the integer index values to the query and not the
STRING of the selected item.
Is there a way to capture these two string values (origin and
destination) and pass them to the query?
I reallllly appreciate anyone who is willing to help me out here.
--Pat