How to pass ">0" from a form to a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In order to have my query choose between credits and debits I would like to
choose on a form and have ">0" or "<0" passed to the query. The error says
it's to complex to calculate. Is there a way?
 
On Fri, 17 Dec 2004 19:23:02 -0800, "Ray Gunderson" <Ray
In order to have my query choose between credits and debits I would like to
choose on a form and have ">0" or "<0" passed to the query. The error says
it's to complex to calculate. Is there a way?

You cannot pass an *operator* as a parameter. I'd suggest having an
Option Group on the form with two radio buttons, labeled >0 and <0,
with values 1 and 2 respectively; in your Query you could have a
criterion like

WHERE (Forms!yourform!optCreditDebit = 1 AND fieldname > 0)
OR (Forms!yourform!optCreditDebit = 2 AND fieldname < 0)


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top