Query parameter

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
 
D

Dirk Goldgar

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.
 
T

TC

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top