+ Reply to Thread
Results 1 to 5 of 5

Thread: Query for search fields on form

  1. #1
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Query for search fields on form

    Hi All,

    Ok, everything seem to be working ok until I added this criteria for one of the fields in the query and on the form.

    Code:
    >=[forms]![form4].[qDays]
    
    All the other fields use something like :

    Code:
    Like [forms]![form4].[qEquipment] & "*"
    
    Is there an issue with using a like in some criteria and >= for another?

  2. #2
    Barn Enthusiast sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69's Avatar
    Join Date
    Mar 2008
    Location
    The frigid northern plains
    Posts
    432
    Rep Power
    7

    I'm not sure I follow what you're asking. Are you doing both criteria at the same time? Have you tried them out one by one?

    The syntax is right..... the only thing I can think of is maybe the format is wrong (remember - unbound textboxes are considered strings. You will have to convert as necessary)
    Join our Folding team: DeveloperBarn Folding
    -----------------------------------
    Folding Stats - Stanford University
    Folding Stats - Extreme Over-Clocking
    Folding Stats - Kakao Stats
    Folding Stats - Xtreme CPU

    -----------------------------------

  3. #3
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    I have qEquipment, qAsset, qIDNo using like and all seems to be working on the search screen, meaning if I only enter data in one of the fields I get results or if I filter further and enter data in two or all three fields I still get results but as soon as I added the qDays then if I try to enter Equipment it doesn't work but if I only enter data for Days it works...

    I checked the data types and all are text except "Days" ..."Days" is number, is this the problem?

  4. #4
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Should I be having something for Nulls?

    I put on the textbox properties default value = ""

  5. #5
    Barn Enthusiast sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69's Avatar
    Join Date
    Mar 2008
    Location
    The frigid northern plains
    Posts
    432
    Rep Power
    7

    well, will there always be days? (I would assume so) try this:

    >= INT(nz([forms]![form4].[qDays],0))

    and

    Like nz([forms]![form4].[qEquipment],"") & "*"
    Join our Folding team: DeveloperBarn Folding
    -----------------------------------
    Folding Stats - Stanford University
    Folding Stats - Extreme Over-Clocking
    Folding Stats - Kakao Stats
    Folding Stats - Xtreme CPU

    -----------------------------------

+ Reply to Thread

Similar Threads

  1. Calculation on fields & question about tables
    By Colper in forum Microsoft Access
    Replies: 16
    Last Post: December 16th, 2009, 11:37 AM
  2. calculations on a calculated fields
    By lbgto in forum Microsoft Access
    Replies: 6
    Last Post: October 29th, 2009, 05:29 PM
  3. load data infile: columns or fields?
    By bryceowen in forum MySQL
    Replies: 1
    Last Post: June 26th, 2009, 02:33 AM
  4. Checkbox on form to change query result
    By tuxalot in forum Microsoft Access
    Replies: 7
    Last Post: February 3rd, 2009, 01:03 PM
  5. Split table because of too many fields??
    By kl99ny in forum Microsoft Access
    Replies: 7
    Last Post: October 22nd, 2008, 02:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO