set criteria for query by form

SusanC

Registered User.
Local time
Today, 17:32
Joined
Feb 18, 2004
Messages
66
Hi,
I've looked through all the past entries on this but can't find exaclty what I need! I have a query which I want to sort via a form.

For example, my query holds a range of records such as 295A-1H/2,
284A-1L/23. etc

How would I enter the form search criteria so it returned all records which lie between, say, 295A-1H/1 to 295A-1H30?

I've tried a Like statement but I don't know where to put it? Should it be on the form properties on in the query criteria?

In the query criteria so far I have Forms![Formname]![ControlName]. I thought something like Forms![Formname]! (Like "[ControlName]*") but this doesn't work.
any help would be great!
Sue
 
In the end, you're going to need an expression that evaluates to this in your query critieria:
Code:
Like 295A-1H*
To produce that, you'll need to type in the 295A-1H part into a control on your form. In the query design, under the field name that holds that data, enter this into the criteria:
Code:
Like Forms![Formname]![ControlName] & "*"
 
dcx693 said:
In the end, you're going to need an expression that evaluates to this in your query critieria:
Code:
Like 295A-1H*
To produce that, you'll need to type in the 295A-1H part into a control on your form. In the query design, under the field name that holds that data, enter this into the criteria:
Code:
Like Forms![Formname]![ControlName] & "*"

Oh you're a little treasure - I knew I was near the answer but I was :confused: !
thanks
Sue
 
SusanC said:
Oh you're a little treasure
Stop it! You're embarrasing me, and now the other boys will start making fun of me. :D
 
dcx693 said:
Stop it! You're embarrasing me, and now the other boys will start making fun of me. :D

Now you know it's only cos they're jealous?!
 
Don't worry, Little Treasure, I've been called worse.. :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom