+ Reply to Thread
Results 1 to 3 of 3

Searching through an Access database with Excel VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    63

    Searching through an Access database with Excel VBA

    I’ve written a macro to search through an Excel pricelist, compare currencies and prices and give me the best price and corresponding vendor for a list of products. Only trouble is that my data has grown exponentially in the last week and I currently have more than 65000 rows. I imported the data into Microsoft Access and would like to use my search VBA algorithm.

    How do I do that? How do I open the Access Database from Excel and then apply my current code to it. I’m using ranges and rows – what I basically do is locate the first occurrence of the sought product, save its price, set a new search range to exclude the first occurrence, search for other rows containing the product and compare their prices to the first one and save the smallest of all values.

    I really have no idea how to do that in Access. Any help will be appreciated!

    Thanks
    Nick

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,009

    Re: Searching through an Access database with Excel VBA

    You'll basically have to start from scratch as the two apps are totally different. You would typically have an exchange rate table and then use a query to extract the lowest price from the product table (linking the two tables on currency code).
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Searching through an Access database with Excel VBA

    Attached file may help you to understand how to use a query from Excel to Access.

    Regards,
    Antonio
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1