Sep 10, 2002 #1 Steve1001 Technical User Nov 1, 2002 17 US Hi I have a table of tarrifs, the vertical column is weights, the horizontal delivery areas a b c d 1 1.0 2.0 2.5 3.0 2 1.5 2.5 3.0 4.0 etc. is it possible to make a query that will select the value based on weight, and delivery area ? Many thanks Steve
Hi I have a table of tarrifs, the vertical column is weights, the horizontal delivery areas a b c d 1 1.0 2.0 2.5 3.0 2 1.5 2.5 3.0 4.0 etc. is it possible to make a query that will select the value based on weight, and delivery area ? Many thanks Steve
Sep 10, 2002 #2 grnzbra Programmer Mar 12, 2002 1,273 US assuming that the delivery area value is a numeric as it would be if it were a key and the weight is a numeric, the sql statement would look like: dim arfname as integer dim wght as long sql = "SELECT " & arfname & " FROM TarrifTable WHERE Weight = " & wght you may have to precondition the weight to fit it into the weights in the table. Upvote 0 Downvote
assuming that the delivery area value is a numeric as it would be if it were a key and the weight is a numeric, the sql statement would look like: dim arfname as integer dim wght as long sql = "SELECT " & arfname & " FROM TarrifTable WHERE Weight = " & wght you may have to precondition the weight to fit it into the weights in the table.
Sep 10, 2002 #3 grnzbra Programmer Mar 12, 2002 1,273 US with your column headings, it would be arfname = areaheading sql = "SELECT '" & arfname & "'..... Upvote 0 Downvote
with your column headings, it would be arfname = areaheading sql = "SELECT '" & arfname & "'.....