Results 1 to 2 of 2
  1. #1
    CazzaGal is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    1

    Query bringing up all Matched Records AND Newly added records...

    The database is to allow the user to search for a part number and then be able to edit/view the information of that part. There can be several part numbers depending on if another company has the same part with a different number. I.e, Company A could have a Bolt with part number 123, and Company B could have the exact same Bolt but part number 789. In the database this part would store both Company A and Company B part numbers within the same record to allow for the user to search either part numbers and get the correct part to appear. For the user to search for the item, there is a ‘Company A’ and ‘Company B’ field within the search form so if they know what company has the part number then they can search directly within that company.



    When the database was created I loaded in a table with all the current parts and information and they appear fine when the query runs. When I realised that any new items added to that table from a form wasn't showing up when the query run, thats when I found a post on a forum that mentioned using 'OR Is Null' which then worked, and allowed all records to be searched and returned based on the search.

    The search/query itself is based on the user inputting a part number, or even a few digits from the part number, for either Company A or Company B. This allows the user to view the part that both companies have a number for, but based on whether they have searched through Company A or Company B.

    The overall problem is that the query is returning the correct record, but is also bringing up the newer added records that have been added from within a form in the database, even if, for example, I search 123 under company A, I'd be getting newly added parts that do not have that part number or maybe even any number under Company A.

    So ultimately, I don't want records that don't match the criteria to appear when searching, because if more parts are being added then finding the correct one among the results would result in time being wasted, etc.

    More Info: The information is all in one table to stop any problems when it comes to ID’s matching up as this happened before and caused problems. It’s also not just myself using the database.

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    post your sql (or a screen shot of the query)

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

Similar Threads

  1. Replies: 6
    Last Post: 07-27-2015, 10:23 AM
  2. Newly added record Search
    By galadrwin in forum Access
    Replies: 2
    Last Post: 02-10-2015, 06:27 AM
  3. Replies: 1
    Last Post: 06-06-2013, 06:12 PM
  4. Replies: 1
    Last Post: 02-16-2013, 11:36 AM
  5. Replies: 4
    Last Post: 01-29-2009, 02:43 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