Results 1 to 8 of 8
  1. #1
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114

    Need to reset search form - Part 2

    The Result:



    Click image for larger version. 

Name:	Query Search Result 2.png 
Views:	18 
Size:	10.0 KB 
ID:	28311

    So, how would you suggest that I stabilize this form/query to have my boss type in the model number and view the all the data.

    Also, how can I reset the form so that he doesn't have to exit everything and start over?

    Many thanks,

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    The form must be unbound. The Model field will be a combobox. You could display the data below in a subform by using a filter in the AfterUpdate of the model without the need for the run query button.

  3. #3
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114
    Thank you,

    I've recreated the form (with UNBOUND fields) and the query. They work fine on a few models, but the query remains blank on other entries.

    The problem now is when I enter some information for a search like LT-48(E) in the Model field, and click the run button. The query returns a blank result (there happen to be 12 entries for this model in the Mod Table. The same thing happens when I enter just LT in the field. It should return all entries for our 5 LT series models (over a hundred), but remains blank.

    I entered SB in the Model field and the result was anything with a B in the name:
    Click image for larger version. 

Name:	B results.png 
Views:	14 
Size:	22.7 KB 
ID:	28396

    So how do I fix this so that when a text string (and all the fields ARE text strings) is entered, all the results appear???

    FYI, I've re-created the form and query. Here are the design & query views:
    Form:
    Click image for larger version. 

Name:	Form design.png 
Views:	14 
Size:	53.2 KB 
ID:	28394

    Query:
    Click image for larger version. 

Name:	Query Design.png 
Views:	14 
Size:	19.8 KB 
ID:	28395

    Many thanks,

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You have an AND in the query - like model AND like eco. That requires that both fields are filled in on the form for your query to return results.

  5. #5
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114
    Thank you for the quick response,

    FYI, the combo box is a good idea, but not practical for our needs as we have over 500 products, of which 443 are still active.

    I changed the query to the following:
    Click image for larger version. 

Name:	Query Design 2.png 
Views:	13 
Size:	22.5 KB 
ID:	28401

    What do you think?

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Does the query produce the results that you are expecting? That is how you will know if it works. Have the form open, type in model numbers, run the query and compare it to the records on the table.

  7. #7
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    For a search form, I prefer to use code and filter the data.
    Attached Files Attached Files

  8. #8
    rebfein's Avatar
    rebfein is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Location
    So Cal
    Posts
    114
    Thank you for the information and the zip file.

    Unfortunately, my boss refuses to pay for me to take coding classes.

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

Similar Threads

  1. Need to reset search form.
    By rebfein in forum Forms
    Replies: 2
    Last Post: 04-19-2017, 09:39 AM
  2. Reset button vba for a File Search
    By redekopp in forum Forms
    Replies: 10
    Last Post: 11-17-2015, 02:31 PM
  3. Replies: 1
    Last Post: 04-09-2015, 05:13 PM
  4. Replies: 2
    Last Post: 03-12-2014, 01:31 AM
  5. Replies: 1
    Last Post: 04-20-2012, 03:16 AM

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