Results 1 to 7 of 7
  1. #1
    mwalk3 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    5

    Problems with Requery Search Form

    Hello everyone,



    I have a database that house information on employees. I have a form called frmSearch ( https://i.imgur.com/geKg08j.jpg ) which is a popup that allows users to select information from comboboxes / checkboxes to filter employees.(ie. Currently Active, Valid Drivers License, Location.) The run Query button at the bottom has the following macros. http://imgur.com/hQueInU .

    When I click on the run query button, it opens up two things, qrySearch: which is just the query that houses the data. And it also opens up a datasheet form called frmqrySearch which looks like this: https://i.imgur.com/mvGA7zD.jpg . The New search button just reopens the original frmSearch.

    PROBLEM: The problem Im having is that the run query button only works the first time. It wont allow me to make a new search without closing the forms and the query. I want the user to be able to create a new search from the frmSearch.

    If you need more information please let me know.

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    It probably is doing what you want but you don't have a refresh event on the last macro. Try adding a refresh/requery it will probably work

  3. #3
    mwalk3 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    5
    Ive been messing around with the macros and Ive got it so it updates the query now. But it still wont update the Datasheet form with the split view. Which macro can I use? repaint / refresh / requery? And where do I put this macro?

  4. #4
    mwalk3 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    5
    frmSearch -> qrySearch -> frmSearchQuery.

    frmSearch is where the combo boxs are, I have macros that open the qrysearch and frmSearchQuery. QrySearch is showing the updated search criteria but frmSearchQuery is not updating.

  5. #5
    mwalk3 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    5
    Ok so... found a fix I think, I just click refresh on the ribbon and it works.... but when I create a macro button to refresh it gives me he error "The command or action "refresh" isnt available right now

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Have you tried the Requery action instead of the Refresh? That action should repaint the form with the new data.

  7. #7
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I always confuse the two so stick them both in. Probably not good advice but its what I do haha.

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

Similar Threads

  1. Replies: 7
    Last Post: 10-19-2015, 07:12 PM
  2. Search Form Problems
    By agure in forum Access
    Replies: 4
    Last Post: 02-15-2014, 01:06 AM
  3. problems with search as you type forms
    By sk88 in forum Access
    Replies: 1
    Last Post: 06-27-2012, 02:01 PM
  4. Few Problems : Search Button Form
    By spideynok in forum Forms
    Replies: 10
    Last Post: 03-29-2012, 01:13 AM
  5. Replies: 4
    Last Post: 01-11-2010, 11:41 PM

Tags for this Thread

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