I have the following query in Access:

SELECT Death.AccountNumber, Count(*) AS NumberOfRecords
FROM Death
GROUP BY Death.AccountNumber
HAVING (((Count(*))>1));

The field AccountNumber has previously been [Acc Number] but this has been updated in both the source Excel spreadsheet to which the Access table is linked and the SQL code in the query.

Nevertheless, every time I run the query Access still prompts me to "Enter Parameter Value" with the description: "Death: duplicate account numbers.Acc Number".

How do I get Access to stop displaying this prompt?

2 Answers 2


Your query doesn't have anything in it about "Death: duplicate account numbers.Acc Number", so there must be some code elsewhere looking for that parameter. As long as its in the code somewhere, you will get the prompt.

NOTE: Make a copy before making doing the below.

Here is a way to find the rouge code:

  1. Open the VBA window, (Alt+F11).
  2. Then use Ctrl+H to open the Replace window.
  3. Type Acc Number in the "find what" window.
  4. Type AccountNumber in the "replace with" window.
  5. Choose Current Project
  6. Use the "Find Next" button to find any missed references.
  7. If you find a reference needing changed, click "replace".
  8. After changing all found references debug the code, run it to see if it works as you desire.

enter image description here


I had this same problem in a local table, where Access was not finding the field name in another query and kept asking for the parameter value.

I discovered that I hadn't saved the queries after renaming the field names, and once I saved them it worked as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.