Re: Help with using form text box to change a query criteria
- From: "ngl1145" <u26037@uwe>
- Date: Fri, 01 Sep 2006 16:10:33 GMT
The criteria is used to obtain customer information based on priority level.
Currently the each customer has a priority number from 1 to 10. I'm setting
up a form that has a textbox where the user can specify if they want to pull
records that are defined such as "1" "2" etc... or if they want to obtain
customers who are a priority level of "<4". This is why I want to add
conditional statements to my query. I thought I could use vba to run an SQL
statement to do this but that did not work based on the string operations
that I was allowed. If you can direct me in another direction that would be
great.
Marshall Barton wrote:
I think I need some help from some of you. I created a simple query[quoted text clipped - 4 lines]
where it looks at the textbox in my form as it's criteria. For example in my
operation" message box. Is there a way I can use the Form textbox to run
conditional criteria like "<10"?
No. The < needs to be in the query instead of the =
Generally, the text box can only contain a value (e.g. 10),
it can not be used to specify the comparison operator.
If you absolutely must allow users to specify the
comparison, you will need to use a different approach where
you use VBA code (probably using the BuildCriteria function)
to construct the query. Since you didn't say anything about
how the query is going to be used, I can't realistically
suggest anything more specific than that.
--
http://www.geocities.com/ngl1145/Sig.jpg
.
- Follow-Ups:
- Re: Help with using form text box to change a query criteria
- From: Marshall Barton
- Re: Help with using form text box to change a query criteria
- References:
- Help with using form text box to change a query criteria
- From: ngl1145
- Re: Help with using form text box to change a query criteria
- From: Marshall Barton
- Help with using form text box to change a query criteria
- Prev by Date: Re: Ranking multiple Columns
- Next by Date: Field too small? appending to yes/no field
- Previous by thread: Re: Help with using form text box to change a query criteria
- Next by thread: Re: Help with using form text box to change a query criteria
- Index(es):
Relevant Pages
|