Results 1 to 2 of 2
  1. #1
    showe2295 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    3

    Look up Query/Macro

    I have a table with hundreds of numerical values. I'm trying to create a way to look for a specific value in that table. If there is not a 1 for 1 match for that value, I'd like the query to look for 2 values that when added equal my original search if that is possible. Example: I plug in a value of 524, I'd like to see all the records that equal 524. If ther are no exact matches, I'd would like the query to search for two records that when added = 524 (400 & 124). For the multiple record matches, I need to match on the highest first. So if there are 2 possibilities (400 & 124 and 300 & 224) I want to see both but the 400 & 124 firstIf not 2, then 3 and so on. Each record in the table would have a unique value in addition to the numericall value.

  2. #2
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    VBA will probably be required.

    Your problem could be solved by iterating through a recordset. It wouldn't be pretty, but it would work.

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

Similar Threads

  1. Run Query in Macro Builder
    By chewbears in forum Queries
    Replies: 0
    Last Post: 11-21-2011, 09:18 AM
  2. Searchform query opened by macro
    By chessico in forum Forms
    Replies: 1
    Last Post: 08-19-2011, 10:03 AM
  3. Running an Update Query from a Macro
    By michaelb in forum Queries
    Replies: 7
    Last Post: 06-02-2011, 09:46 PM
  4. Replies: 0
    Last Post: 01-12-2011, 12:43 PM
  5. Replies: 0
    Last Post: 01-01-2007, 02:26 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