Skip to content

Query Access with Parameters

filcuk edited this page Jul 3, 2019 · 1 revision

Q

What one might want to achieve, is to use a date from certain cell to get table from an Access database Microsoft doesn't provide good documentation on how to achieve this.

You can wipe your tears away now.

  1. Excel > Data > External Data > Microsoft Query (MSQRY32.EXE in office root)
  2. Find your database, run through dialog and before 'Finish', select 'Edit query in Microsoft Query' 3a Criteria > Add Criteria 3b OR click icon with glasses and filter (Show/Hide Criteria) 3c OR just edit the SQL command and add criteria in conditions (... WHERE [criteriaA] = fieldA ...)
  3. File > Return Data To Excel
  4. Import Data > Properties
  5. Connection Properties > Definition
  6. Now the field 'Parameters...' is clickable and you can select any input
Clone this wiki locally