Query parameter

  • Thread starter Thread starter G Lam
  • Start date Start date
G

G Lam

Hi,
I use A2K and ODBC to connect to a Btrieve table. In my select query, if I
set the prameter Between "12345" And "22345", the query does what I want.
If I change it to Between [First Number] And [Last Number], after two
numbers input, it says "ODBC failed" or some thing like that.
What did I do wrong? How can I fix it?
Thank you.
Gary
 
G Lam said:
Hi,
I use A2K and ODBC to connect to a Btrieve table. In my select query,
if I set the prameter Between "12345" And "22345", the query does
what I want. If I change it to Between [First Number] And [Last
Number], after two numbers input, it says "ODBC failed" or some thing
like that.
What did I do wrong? How can I fix it?
Thank you.
Gary

I'm not sure, but you might try opening the query in design view,
clicking menu items Query -> Parameters..., and defining the parameters
First Number and Last Number as text.
 
Assuming the values are >text< (as implied by your quotes):

BETWEEN """" & [First Number] & """" AND """" & [Last Number] & """"

Each """" above, is four consecutive double-quotes.

HTH,
TC
 
Back
Top