R
Rtomli
I seem to have a problem that I do not understand. I am querying an access
database from excel, the path is stored in cell A1. Catalog Number is a text
field in ACCESS and List Price is a numeric filed.
When I use the following in an excel spreadsheet, it works fine:
=SQL.REQUEST($A$1,,,"SELECT `Catalog Number` FROM `Pricing Database` WHERE
(`Pricing Database`.`List Price`= "&G5&")")
I can type a list price in cell G5 and return a catalog number.
However, when I try it the other way around:
=SQL.REQUEST($A$1,,,"SELECT `List Price` FROM `Pricing Database` WHERE
(`Pricing Database`.`Catalog Number`="&G6&")")
I get the N/A error message. There is something wrong in my WHERE statement
that will not allow me to compare the two text fields (Catalog Number in the
ACCESS database and the catalog number stored in cell G6 which is formated as
a text field.
Can someone point out the error in my ways?
Thank you in advance for your assistance.
Ron
database from excel, the path is stored in cell A1. Catalog Number is a text
field in ACCESS and List Price is a numeric filed.
When I use the following in an excel spreadsheet, it works fine:
=SQL.REQUEST($A$1,,,"SELECT `Catalog Number` FROM `Pricing Database` WHERE
(`Pricing Database`.`List Price`= "&G5&")")
I can type a list price in cell G5 and return a catalog number.
However, when I try it the other way around:
=SQL.REQUEST($A$1,,,"SELECT `List Price` FROM `Pricing Database` WHERE
(`Pricing Database`.`Catalog Number`="&G6&")")
I get the N/A error message. There is something wrong in my WHERE statement
that will not allow me to compare the two text fields (Catalog Number in the
ACCESS database and the catalog number stored in cell G6 which is formated as
a text field.
Can someone point out the error in my ways?
Thank you in advance for your assistance.
Ron