Results 1 to 4 of 4
  1. #1
    scotty562 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    6

    Criteria issue when using user input and > < ect


    I have a simple query that is based on criteria it's getting from user input. So if the user enters 5 it shows record five. The problem is if I try and enter <5 it says "This expression is typed incorrectly, or it is too complex to be evaluated."

    If I put <5 manaully in the criteria field and run it; it runs just fine. What's going on?

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    your post is not entirely clear. the table field is integer type? direct entry <5 works. but call from a form does not i.e. Forms!.FormName.ControlName ?

    try: <Forms!.FormName.ControlName

    if that works - then your issue is bringing over text from the form into an integer field at the query/table.

  3. #3
    scotty562 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    6
    It's a number field. In my query designer I have my field filled in and my table filled in. I also have the criteria as [Please enter selection]. I'm not trying to bring the data in from another object.

    If I type <5 directly into the criteria field from the query designer, it'll dispaly the data. If I put [Please enter selection] in the criteria field, then run it while in the query designer and then enter <5 in the window it pops up I get the message I posted in my original post.

    Hope that clears up my post.

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    one would think that a parameter prompt approach (that is what you are doing) would work - but alas it is the same situation.

    for dynamic use of symbols <> etc - by users that are not in the query itself - is only accommodated by building the sql statement in vb....and then running it. Not in query design.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Reporting with user input
    By tazbergy in forum Reports
    Replies: 1
    Last Post: 09-12-2010, 11:26 PM
  2. Replies: 6
    Last Post: 07-22-2010, 05:53 PM
  3. User Input Query
    By ManC in forum Queries
    Replies: 2
    Last Post: 03-04-2010, 07:09 PM
  4. Chart with user input
    By mungyun in forum Access
    Replies: 1
    Last Post: 12-28-2009, 07:44 PM
  5. Set required user input
    By ZeusOsiris in forum Database Design
    Replies: 2
    Last Post: 12-04-2006, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums