Query Prompt is displayed when Value should already be there

henryihunter1954

Registered User.
Local time
Today, 09:25
Joined
Mar 2, 2016
Messages
89
I have a form that has a Drop-Down Menu.
After making the selection from the Drop-Down, I have a macro
that runs a query.
The query displays the fields that I need and also the field that has
the Value of the Drop-Down from the form. (The records that meet the
criteria should show in a report that is based on the query)
The problem arises when I get it to work properly, the next time I run
the macro, the query prompt shows up, asking me to input the value of
the Drop-Down menu.
I have already specified that I wanted the value to be the data in the drop-down but the prompt from the query comes up.
I need some suggestions as to how I can fix this problem.

I've done this many times before but not to go into a report.
I don't think that going to the report is really the issue.

Thanking you all in advance for suggestions.
 
Does the form stay open? It has to, or more accurately has to be open when the query runs.
 
I checked it. The form that has Drop-Down Menu with the criteria field does stay open.

I got it run...5 or 6 times. Worked great.

But once I closed the entire program and opened it to check it again, it failed.

Still need your suggestions.
Thanks.
 
Casting aside the obvious, like the form being open, or it never working anymore, I'd suggest corruption. Hate to jump to that, but if it was working for a while, and no updates are being mentioned, then maybe. Going on the assumption that the macro was created properly, or doesn't also depend on some other condition that you've forgotten about. A fix might be to convert it to code.
 
I'm going to redo the code again with the form and the Report.
It may be corrupted.
Going to try it and thanks again for your input.

I will respond to let you know if it works properly.
Thank you for your suggestions.
 
..
After making the selection from the Drop-Down, I have a macro
that runs a query.
..
The records that meet the criteria should show in a report that is based on the query ..
Why are you first running a query and then open the report?
Why are you not using the query as the record source in the report, (then it will trigger the query to run)?
If you can't get it, post your database with some sample data + description to reproduce the problem.
 
The report is based on the query.
I stated it incorrectly.
When the macro calls for the report, the report is based on the query.
 

Users who are viewing this thread

Back
Top Bottom