+ Reply to Thread
Results 1 to 5 of 5

Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

  1. #1
    Registered User
    Join Date
    07-02-2008
    Location
    washington
    Posts
    20

    Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

    Ok.. SO I've been trying to build a Combo Search/Filter form for a simple 1 table db in Access 2007 (eventually will be 03 compatable but still)

    I found a fairly streamlined Filter/Search Form with Report Generator that allows for at least 3 variables to be searched... (Exactly what I'm needing,..) and I believe it wont be very hard to expand on it if need be.

    The issue is that it's design only addresses Text search/filter (LIKE *) and Numeric/Mathematical (>=< ) and not DATE.

    Search/filter by DATE is one of the PRIMARY aspects of needed functionality.
    IE: filter all cases that include (LIKE *) from field "A",
    and (LIKE *) from field "B"
    that are (AFTER) "2/3/2009"
    (( and eventually adding a 4th search to accommodate ;
    and (Before) "5/6/2009" ))

    So far it looks as though the framework of this Filter/Search Form is all there..
    I'm just not able to get the syntax correct for the Date function... (or likely I need to add something to have DATEs treated differently in the search design,..

    Here is the code,.. but likely better if you just Dload and look at the whole thing as I'm probably missing something elsewhere..

    Many have been modified, and " ' non code markers & explanations "

    Lines 13-15 I added, and they function as desired ( it seems)
    Lines 121-125 are where I think it may simply be a syntax issue, unless I do in fact lack the proper support code, which I would need help with.

    To see or test functionality in the sample, use only "pt_last" as your text search, and "initial_receipt_date" as your date search.

    If you wanted to use or try the Math/Numeric, you would need to change the "Customer" DB referrers to "8th" as my DB is named "8th" the template form used "Customers" as their DB.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-02-2008
    Location
    washington
    Posts
    20

    Re: Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

    Also,.. if someone has an easier, cleaner or superior way to achieve the same functionality.. By all means, I'm all ears.. err.. eyes on screen,. whatever.. I'm open to it and appreciative of anything...

  3. #3
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

    Without looking at your attachment (I'm on A2K3), I'd say the issue is the single quote marks around your date. That's telling it that it's text, rendering your date to look like #1/1/2009#. Try removing the single quotes with just the pound signs.

    Please Login or Register  to view this content.

    As far as a date picker, there are a lot of them out there including some right within access (at least '03 has one included). You can find them in the activex controls.

  4. #4
    Registered User
    Join Date
    07-02-2008
    Location
    washington
    Posts
    20

    Re: Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

    really silly of me not upload a 2003 version..

    I am attatching a stripped down version of the original template "search42003" as well as one prepped for my needs "TemplatNeedingHelp2003"

    Please take a look and see what you think...

    These should be a cleaner (less convoluted junk than the earlier one with all my mixed up attempts potentially)

    The goal, again, is to be able to search by a combination of funtions and to be able to easily ADD fields that can be searched by simply adding them in the selection list instead. So you would be able to add a field of say, "end_date" to the Table, and then merely add it in the Properties for the cbosearch in design view for the form, as well as the Report, as well as the begining of the VBA code listing it in the DateSearch options and have it be fully functional merely as another option to search from the pulldown.

    THANKSSSS
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Great Combo Filter/Search form, cant get DATE filter to integrate. HELP

    if you plug in a value and step through the code, it shows a value for GCriteria as "initial_receipt_date >#initial_receipt_date#". I think you need to adjust the field that the code is pointing to from:

    GCriteria = cboSearchField1.Value & " >#" & cboSearchField1.Value & "#"
    to
    GCriteria = cboSearchField1.Value & " >#" & txtSearchValue1.Value & "#"
    All of the other values point to the txtSearchValue boxes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1