Results 1 to 4 of 4
  1. #1
    saudkazia is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Location
    India
    Posts
    71

    open form with criteria but allow search lookup

    hi



    i am trying to open a form based on criteria customerid = customer_id. this works perfectly. but in the form header i have a lookup (standard search record macro) which doesn't seem to work because only 1 record is in the recordset. How do i make this work. I tried using the removeallfilters command before the search on the lookup combo but it works only 1 time after that I get an error (possibly due to no filter applied). How do i go about doing this.

    so in short without giving out specific details i need to know a way to either - open the form and go to record instead of filtering it or to open a form and filter to the record but allow after update of combo box to unfilter and search within all records.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    so in short without giving out specific details
    Without specific details, it is hard to give a specific answer.

    i am trying to open a form based on criteria customerid = customer_id. this works perfectly. but in the form header i have a lookup (standard search record macro) which doesn't seem to work because only 1 record is in the recordset.
    This is normal operation. You open a form with a query that has criteria applied (customerid = customer_id), there would only be the records that match the customer_id.

    The "removeallfilters" command has no effect because you have not applied a filter (from what you have posted), you limited the records returned.

    Options:
    1) Close the form, then open it again with a different customer_id number.
    2) Use a search form that opens a details form based on the customer_id number.
    3) Open the form with no criteria, then set a filter. (if not a major amount of records)
    4) Change the record source when you want to change the customer_id number.


    I never use Macros, only VBA code......

  3. #3
    saudkazia is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Location
    India
    Posts
    71
    i used a macro because that's what is default when searching for record. you options don't give the desired result though. is there a way instead of criteria being applied it would only go to the record that i clicked on. its just that when i open the customer to that record i would like the option to view all the other records. i hide navigation controls because they make the forms design look bad.

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    you options don't give the desired result though
    Can you explain the process? Pretend we're in line at a fast food place and I know nothing about Access. No Access jargon.

    Or post your dB with a few test records for demonstration. Change sensitive data, do a "Compact & Repair", then Zip it and attach it to a post.

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

Similar Threads

  1. Using a Lookup form to search results in a Query
    By Kattracks32 in forum Forms
    Replies: 1
    Last Post: 11-20-2016, 06:46 AM
  2. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  3. Lookup on form to open report
    By Nadine67 in forum Access
    Replies: 2
    Last Post: 07-26-2015, 09:06 PM
  4. Search Form - Dialog box asks for search criteria
    By faythe1215 in forum Queries
    Replies: 3
    Last Post: 02-10-2015, 05:54 PM
  5. Open form based on search criteria
    By cactuspete13 in forum Forms
    Replies: 7
    Last Post: 03-06-2013, 10:17 AM

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