Query criteria

G

Guest

Here's what I'm trying to do...
I have a database of customer information and I want to be able to retrieve
it by allowing the user to input from/to limits. The customer numbers are
aplhanumeric and can be upto 10 characters, although some are as short as
4-characters. I am trying to use a form to capture the user input. I am using
unbound text boxes.

I can retrive the records for a single customer using the expression (Like
*&[Forms]![MyForm]![From]&*) in the query criteria. However, I don't know how
to write the expression that will let me limit to a range. Typically I would
use a Between/And style but that doesn't seem to work.

Any ideas or guidance will be appreciated.

Ted
 
E

Ed Warren

Does this work for you?

SELECT Table1.text
FROM Table1
WHERE (((Table1.text)>="a*" And (Table1.text)<="cd*"));

This should give any rows that start with a up to rows that start with cd.

You could get the values for your range from a couple of text boxes on a
from, then build the required query.

Ed Warren.
 
F

fredg

Here's what I'm trying to do...
I have a database of customer information and I want to be able to retrieve
it by allowing the user to input from/to limits. The customer numbers are
aplhanumeric and can be upto 10 characters, although some are as short as
4-characters. I am trying to use a form to capture the user input. I am using
unbound text boxes.

I can retrive the records for a single customer using the expression (Like
*&[Forms]![MyForm]![From]&*) in the query criteria. However, I don't know how
to write the expression that will let me limit to a range. Typically I would
use a Between/And style but that doesn't seem to work.

Any ideas or guidance will be appreciated.

Ted

Data such as "PB234" and "RS123698"?

Between [Forms]![MyForm]![FromCustNum] and
[Forms]![MyForm]![ToCustNum]
 

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