RE: Query by form problems
- From: rpbsr <rpbsr@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Jul 2008 12:41:00 -0700
Karl,
I'm a little confused. Should I add a list box next to my current text box
or replace it with a two column list box? Am I using the current query or
does the list box use a query such as you have listed below? Added to its row
source? Could we use a real example, e.g., using the income field in my
tblMembers. The current text box is named WhatIncome and uses the query
"QBF_members_query". Please forgive these basic questions, but I'm new at
this.
Thanks
Robert
"KARL DEWEY" wrote:
.utility from this form.I really would like to use boolean operators with this to get maximum
There is one way I can can think of to do it. Do not enter the '>' or '<'
in the same text box but have a list box with two columns (value & display)
to select from. In the query use both the text box and list box for criteria.
SELECT YourTable.*, [Forms]![YourForm]![ListBox] AS X
FROM YourTable
WHERE (((YourTable.debit)=[Forms]![YourForm]![TextBox]) AND
(([Forms]![YourForm]![ListBox])=1)) OR
(((YourTable.debit)>[Forms]![YourForm]![TextBox]) AND
(([Forms]![YourForm]![ListBox])=2)) OR
(((YourTable.debit)<[Forms]![YourForm]![TextBox]) AND
(([Forms]![YourForm]![ListBox])=3));
List box default to 1 for = (equal); 2 for > (greater than); and 3 for <
(less than). You can have more selections such as >= and <= byt using more
numbers.
--
KARL DEWEY
Build a little - Test a little
"rpbsr" wrote:
I've run across a great QBF technique in Microsoft "Help and Support"
(Article ID: 304428). It uses the following general query criteria:
Forms!FormName!ControlName Or Forms!FormName!ControlName Is Null
and also:
Between Forms!FormName!StartDate And Forms!FormName!EndDate Or _
Forms!FormName!StartDate Is Null You can use this criteria statement to
query a date field by using Start Date and End Date
My text data type fields in the form produce expected results. Two numeric
fields
(age & income) produce results as expected, but cannot use boolean
operators, e.g., > in the form. I get an error "The value you entered isn't
valid for this field..."
I have one numeric field (family size) that returns all records, regardless
of the number I put in the form field.
I really would like to use boolean operators with this to get maximum
utility from this form.
Appreciate any help on this.
Thanks.
- Follow-Ups:
- RE: Query by form problems
- From: KARL DEWEY
- RE: Query by form problems
- References:
- RE: Query by form problems
- From: KARL DEWEY
- RE: Query by form problems
- Prev by Date: Re: Still Struggling...
- Next by Date: RE: Query by form problems
- Previous by thread: RE: Query by form problems
- Next by thread: RE: Query by form problems
- Index(es):
Relevant Pages
|